]> git.hungrycats.org Git - linux/commit
nfsd: ensure new clients break delegations
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 16 Apr 2021 18:00:14 +0000 (14:00 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:40 +0000 (10:29 +0200)
commitf6ab92ea9132a9734417761734de6c68231620fc
tree02b180d09fc429b3673f582b0f4ef833a045f0be
parentcb557c7d68b589f732c1f417c4f742a7da113dd3
nfsd: ensure new clients break delegations

[ Upstream commit 217fd6f625af591e2866bebb8cda778cf85bea2e ]

If nfsd already has an open file that it plans to use for IO from
another, it may not need to do another vfs open, but it still may need
to break any delegations in case the existing opens are for another
client.

Symptoms are that we may incorrectly fail to break a delegation on a
write open from a different client, when the delegation-holding client
already has a write open.

Fixes: 28df3d1539de ("nfsd: clients don't need to break their own delegations")
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4state.c