nfsd: ensure new clients break delegations
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 16 Apr 2021 18:00:14 +0000 (14:00 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Fri, 16 Apr 2021 19:08:37 +0000 (15:08 -0400)
commit217fd6f625af591e2866bebb8cda778cf85bea2e
treee454dfd4e46ad96a2438fff61ffe548c43ca712d
parent70c5307564035c160078401f541c397d77b95415
nfsd: ensure new clients break delegations

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>
fs/nfsd/nfs4state.c