]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
nfsd4: remove check_conflicting_opens warning
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 25 Sep 2020 14:09:58 +0000 (10:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:51:26 +0000 (11:51 +0100)
[ Upstream commit 50747dd5e47bde3b7d7f839c84d0d3b554090497 ]

There are actually rare races where this is possible (e.g. if a new open
intervenes between the read of i_writecount and the fi_fds).

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4state.c

index 0525acfe3131404466553243334ce0865faf818d..1f646a27481fb995ab0944ad3f695f47a9bb6b81 100644 (file)
@@ -4954,7 +4954,6 @@ static int nfsd4_check_conflicting_opens(struct nfs4_client *clp,
                writes--;
        if (fp->fi_fds[O_RDWR])
                writes--;
-       WARN_ON_ONCE(writes < 0);
        if (writes > 0)
                return -EAGAIN;
        spin_lock(&fp->fi_lock);