aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 17:42:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-31 17:42:28 -0400
commit08843b79fb35d33859e0f8f11a7318341076e4d1 (patch)
treee56e122146985b359d50787e3d1df640c4582dfa /fs/nfsd/nfs4proc.c
parentcc8362b1f6d724e46f515121d442779924b19fec (diff)
parent2c142baa7b237584bae7dc28630851701497e1ef (diff)
Merge branch 'nfsd-next' of git://linux-nfs.org/~bfields/linux
Pull nfsd changes from J. Bruce Fields: "This has been an unusually quiet cycle--mostly bugfixes and cleanup. The one large piece is Stanislav's work to containerize the server's grace period--but that in itself is just one more step in a not-yet-complete project to allow fully containerized nfs service. There are a number of outstanding delegation, container, v4 state, and gss patches that aren't quite ready yet; 3.7 may be wilder." * 'nfsd-next' of git://linux-nfs.org/~bfields/linux: (35 commits) NFSd: make boot_time variable per network namespace NFSd: make grace end flag per network namespace Lockd: move grace period management from lockd() to per-net functions LockD: pass actual network namespace to grace period management functions LockD: manage grace list per network namespace SUNRPC: service request network namespace helper introduced NFSd: make nfsd4_manager allocated per network namespace context. LockD: make lockd manager allocated per network namespace LockD: manage grace period per network namespace Lockd: add more debug to host shutdown functions Lockd: host complaining function introduced LockD: manage used host count per networks namespace LockD: manage garbage collection timeout per networks namespace LockD: make garbage collector network namespace aware. LockD: mark host per network namespace on garbage collect nfsd4: fix missing fault_inject.h include locks: move lease-specific code out of locks_delete_lock locks: prevent side-effects of locks_release_private before file_lock is initialized NFSd: set nfsd_serv to NULL after service destruction NFSd: introduce nfsd_destroy() helper ...
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c18
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();