summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields2013-06-21 17:05:32 +0200
committerJ. Bruce Fields2013-07-01 23:32:07 +0200
commitd08d32e6e5c0fee127d3b20d70f5b59d8af0a261 (patch)
treef4a7ff99509cd1d2b1d78f597aa8e102ee4ce77d /fs/nfsd
parentnfsd4: do not throw away 4.1 lock state on last unlock (diff)
downloadkernel-qcow2-linux-d08d32e6e5c0fee127d3b20d70f5b59d8af0a261.tar.gz
kernel-qcow2-linux-d08d32e6e5c0fee127d3b20d70f5b59d8af0a261.tar.xz
kernel-qcow2-linux-d08d32e6e5c0fee127d3b20d70f5b59d8af0a261.zip
nfsd4: return delegation immediately if lease fails
This case shouldn't happen--the administrator shouldn't really allow other applications access to the export until clients have had the chance to reclaim their state--but if it does then we should set the "return this lease immediately" bit on the reply. That still leaves some small races, but it's the best the protocol allows us to do in the case a lease is ripped out from under us.... Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index a7d8a11943ee..d44a4bf71cef 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3143,8 +3143,10 @@ out_free:
out_no_deleg:
open->op_delegate_type = NFS4_OPEN_DELEGATE_NONE;
if (open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS &&
- open->op_delegate_type != NFS4_OPEN_DELEGATE_NONE)
+ open->op_delegate_type != NFS4_OPEN_DELEGATE_NONE) {
dprintk("NFSD: WARNING: refusing delegation reclaim\n");
+ open->op_recall = 1;
+ }
/* 4.1 client asking for a delegation? */
if (open->op_deleg_want)