aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2015-08-06 12:47:02 -0400
committerJ. Bruce Fields <bfields@redhat.com>2015-08-13 10:22:06 -0400
commitc87fb4a378f93f114b9906e180d83877cee4e7f4 (patch)
tree79af8260a9b9788247e37650fee5837799791723 /fs/nfsd/nfs4proc.c
parent4bc6603778e473938ae815123b786e724084790c (diff)
lockd: NLM grace period shouldn't block NFSv4 opens
NLM locks don't conflict with NFSv4 share reservations, so we're not going to learn anything new by watiting for them. They do conflict with NFSv4 locks and with delegations. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index e779d7db24b0..b9681ee0ed19 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -415,10 +415,10 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
415 /* Openowner is now set, so sequence id will get bumped. Now we need 415 /* Openowner is now set, so sequence id will get bumped. Now we need
416 * these checks before we do any creates: */ 416 * these checks before we do any creates: */
417 status = nfserr_grace; 417 status = nfserr_grace;
418 if (locks_in_grace(net) && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS) 418 if (opens_in_grace(net) && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
419 goto out; 419 goto out;
420 status = nfserr_no_grace; 420 status = nfserr_no_grace;
421 if (!locks_in_grace(net) && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) 421 if (!opens_in_grace(net) && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
422 goto out; 422 goto out;
423 423
424 switch (open->op_claim_type) { 424 switch (open->op_claim_type) {
@@ -827,7 +827,7 @@ nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
827{ 827{
828 __be32 status; 828 __be32 status;
829 829
830 if (locks_in_grace(SVC_NET(rqstp))) 830 if (opens_in_grace(SVC_NET(rqstp)))
831 return nfserr_grace; 831 return nfserr_grace;
832 status = nfsd_unlink(rqstp, &cstate->current_fh, 0, 832 status = nfsd_unlink(rqstp, &cstate->current_fh, 0,
833 remove->rm_name, remove->rm_namelen); 833 remove->rm_name, remove->rm_namelen);
@@ -846,7 +846,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
846 846
847 if (!cstate->save_fh.fh_dentry) 847 if (!cstate->save_fh.fh_dentry)
848 return status; 848 return status;
849 if (locks_in_grace(SVC_NET(rqstp)) && 849 if (opens_in_grace(SVC_NET(rqstp)) &&
850 !(cstate->save_fh.fh_export->ex_flags & NFSEXP_NOSUBTREECHECK)) 850 !(cstate->save_fh.fh_export->ex_flags & NFSEXP_NOSUBTREECHECK))
851 return nfserr_grace; 851 return nfserr_grace;
852 status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname, 852 status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname,