]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: don't allow reexport reclaims
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 20 Aug 2021 21:02:06 +0000 (17:02 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 26 Aug 2021 19:32:28 +0000 (15:32 -0400)
commit95f2cb8d84b986a2bc80f6af77ae4cba8f8ffa0c
treec61a9d239c8cb2e1b86b49412d8d19b94081675b
parent585c4a2c12c4baed1f34ee0437f7312d106dbc6e
nfs: don't allow reexport reclaims

In the reexport case, nfsd is currently passing along locks with the
reclaim bit set.  The client sends a new lock request, which is granted
if there's currently no conflict--even if it's possible a conflicting
lock could have been briefly held in the interim.

We don't currently have any way to safely grant reclaim, so for now
let's just deny them all.

I'm doing this by passing the reclaim bit to nfs and letting it fail the
call, with the idea that eventually the client might be able to do
something more forgiving here.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfs/file.c
fs/nfsd/nfs4state.c
fs/nfsd/nfsproc.c
include/linux/errno.h
include/linux/fs.h