diff options
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 987e719fbae8..c9c1c0a25417 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -354,10 +354,10 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
354 | /* Openowner is now set, so sequence id will get bumped. Now we need | 354 | /* Openowner is now set, so sequence id will get bumped. Now we need |
355 | * these checks before we do any creates: */ | 355 | * these checks before we do any creates: */ |
356 | status = nfserr_grace; | 356 | status = nfserr_grace; |
357 | if (locks_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS) | 357 | if (locks_in_grace(SVC_NET(rqstp)) && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS) |
358 | goto out; | 358 | goto out; |
359 | status = nfserr_no_grace; | 359 | status = nfserr_no_grace; |
360 | if (!locks_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) | 360 | if (!locks_in_grace(SVC_NET(rqstp)) && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS) |
361 | goto out; | 361 | goto out; |
362 | 362 | ||
363 | switch (open->op_claim_type) { | 363 | switch (open->op_claim_type) { |
@@ -686,7 +686,8 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
686 | 686 | ||
687 | nfs4_lock_state(); | 687 | nfs4_lock_state(); |
688 | /* check stateid */ | 688 | /* check stateid */ |
689 | if ((status = nfs4_preprocess_stateid_op(cstate, &read->rd_stateid, | 689 | if ((status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), |
690 | cstate, &read->rd_stateid, | ||
690 | RD_STATE, &read->rd_filp))) { | 691 | RD_STATE, &read->rd_filp))) { |
691 | dprintk("NFSD: nfsd4_read: couldn't process stateid!\n"); | 692 | dprintk("NFSD: nfsd4_read: couldn't process stateid!\n"); |
692 | goto out; | 693 | goto out; |
@@ -741,7 +742,7 @@ nfsd4_remove(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
741 | { | 742 | { |
742 | __be32 status; | 743 | __be32 status; |
743 | 744 | ||
744 | if (locks_in_grace()) | 745 | if (locks_in_grace(SVC_NET(rqstp))) |
745 | return nfserr_grace; | 746 | return nfserr_grace; |
746 | status = nfsd_unlink(rqstp, &cstate->current_fh, 0, | 747 | status = nfsd_unlink(rqstp, &cstate->current_fh, 0, |
747 | remove->rm_name, remove->rm_namelen); | 748 | remove->rm_name, remove->rm_namelen); |
@@ -760,8 +761,8 @@ nfsd4_rename(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
760 | 761 | ||
761 | if (!cstate->save_fh.fh_dentry) | 762 | if (!cstate->save_fh.fh_dentry) |
762 | return status; | 763 | return status; |
763 | if (locks_in_grace() && !(cstate->save_fh.fh_export->ex_flags | 764 | if (locks_in_grace(SVC_NET(rqstp)) && |
764 | & NFSEXP_NOSUBTREECHECK)) | 765 | !(cstate->save_fh.fh_export->ex_flags & NFSEXP_NOSUBTREECHECK)) |
765 | return nfserr_grace; | 766 | return nfserr_grace; |
766 | status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname, | 767 | status = nfsd_rename(rqstp, &cstate->save_fh, rename->rn_sname, |
767 | rename->rn_snamelen, &cstate->current_fh, | 768 | rename->rn_snamelen, &cstate->current_fh, |
@@ -845,7 +846,7 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
845 | 846 | ||
846 | if (setattr->sa_iattr.ia_valid & ATTR_SIZE) { | 847 | if (setattr->sa_iattr.ia_valid & ATTR_SIZE) { |
847 | nfs4_lock_state(); | 848 | nfs4_lock_state(); |
848 | status = nfs4_preprocess_stateid_op(cstate, | 849 | status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), cstate, |
849 | &setattr->sa_stateid, WR_STATE, NULL); | 850 | &setattr->sa_stateid, WR_STATE, NULL); |
850 | nfs4_unlock_state(); | 851 | nfs4_unlock_state(); |
851 | if (status) { | 852 | if (status) { |
@@ -890,7 +891,8 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
890 | return nfserr_inval; | 891 | return nfserr_inval; |
891 | 892 | ||
892 | nfs4_lock_state(); | 893 | nfs4_lock_state(); |
893 | status = nfs4_preprocess_stateid_op(cstate, stateid, WR_STATE, &filp); | 894 | status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), |
895 | cstate, stateid, WR_STATE, &filp); | ||
894 | if (filp) | 896 | if (filp) |
895 | get_file(filp); | 897 | get_file(filp); |
896 | nfs4_unlock_state(); | 898 | nfs4_unlock_state(); |