aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-09-13 04:25:37 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-13 11:22:31 -0400
commitf2327d9adb1e948a7041128e971effd8d6e2d42c (patch)
treec71c0eaee80dac069b7bb4f7d2e14bcbcfee14fe /fs/nfsd/nfs4proc.c
parent849823c52d9c96cf777038670bb0ee3a291ca69d (diff)
[PATCH] nfsd4: move replay_owner
It seems more natural to move the setting of the replay_owner into the relevant procedure instead of doing it in nfsv4_proc_compound. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index e08edc17c6a0..361b4007d4a0 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -162,7 +162,7 @@ do_open_fhandle(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_
162 162
163 163
164static inline int 164static inline int
165nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open) 165nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open, struct nfs4_stateowner **replay_owner)
166{ 166{
167 int status; 167 int status;
168 dprintk("NFSD: nfsd4_open filename %.*s op_stateowner %p\n", 168 dprintk("NFSD: nfsd4_open filename %.*s op_stateowner %p\n",
@@ -238,8 +238,10 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open
238 */ 238 */
239 status = nfsd4_process_open2(rqstp, current_fh, open); 239 status = nfsd4_process_open2(rqstp, current_fh, open);
240out: 240out:
241 if (open->op_stateowner) 241 if (open->op_stateowner) {
242 nfs4_get_stateowner(open->op_stateowner); 242 nfs4_get_stateowner(open->op_stateowner);
243 *replay_owner = open->op_stateowner;
244 }
243 nfs4_unlock_state(); 245 nfs4_unlock_state();
244 return status; 246 return status;
245} 247}
@@ -809,8 +811,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
809 op->status = nfsd4_access(rqstp, current_fh, &op->u.access); 811 op->status = nfsd4_access(rqstp, current_fh, &op->u.access);
810 break; 812 break;
811 case OP_CLOSE: 813 case OP_CLOSE:
812 op->status = nfsd4_close(rqstp, current_fh, &op->u.close); 814 op->status = nfsd4_close(rqstp, current_fh, &op->u.close, &replay_owner);
813 replay_owner = op->u.close.cl_stateowner;
814 break; 815 break;
815 case OP_COMMIT: 816 case OP_COMMIT:
816 op->status = nfsd4_commit(rqstp, current_fh, &op->u.commit); 817 op->status = nfsd4_commit(rqstp, current_fh, &op->u.commit);
@@ -831,15 +832,13 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
831 op->status = nfsd4_link(rqstp, current_fh, save_fh, &op->u.link); 832 op->status = nfsd4_link(rqstp, current_fh, save_fh, &op->u.link);
832 break; 833 break;
833 case OP_LOCK: 834 case OP_LOCK:
834 op->status = nfsd4_lock(rqstp, current_fh, &op->u.lock); 835 op->status = nfsd4_lock(rqstp, current_fh, &op->u.lock, &replay_owner);
835 replay_owner = op->u.lock.lk_stateowner;
836 break; 836 break;
837 case OP_LOCKT: 837 case OP_LOCKT:
838 op->status = nfsd4_lockt(rqstp, current_fh, &op->u.lockt); 838 op->status = nfsd4_lockt(rqstp, current_fh, &op->u.lockt);
839 break; 839 break;
840 case OP_LOCKU: 840 case OP_LOCKU:
841 op->status = nfsd4_locku(rqstp, current_fh, &op->u.locku); 841 op->status = nfsd4_locku(rqstp, current_fh, &op->u.locku, &replay_owner);
842 replay_owner = op->u.locku.lu_stateowner;
843 break; 842 break;
844 case OP_LOOKUP: 843 case OP_LOOKUP:
845 op->status = nfsd4_lookup(rqstp, current_fh, &op->u.lookup); 844 op->status = nfsd4_lookup(rqstp, current_fh, &op->u.lookup);
@@ -853,16 +852,13 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
853 op->status = nfs_ok; 852 op->status = nfs_ok;
854 break; 853 break;
855 case OP_OPEN: 854 case OP_OPEN:
856 op->status = nfsd4_open(rqstp, current_fh, &op->u.open); 855 op->status = nfsd4_open(rqstp, current_fh, &op->u.open, &replay_owner);
857 replay_owner = op->u.open.op_stateowner;
858 break; 856 break;
859 case OP_OPEN_CONFIRM: 857 case OP_OPEN_CONFIRM:
860 op->status = nfsd4_open_confirm(rqstp, current_fh, &op->u.open_confirm); 858 op->status = nfsd4_open_confirm(rqstp, current_fh, &op->u.open_confirm, &replay_owner);
861 replay_owner = op->u.open_confirm.oc_stateowner;
862 break; 859 break;
863 case OP_OPEN_DOWNGRADE: 860 case OP_OPEN_DOWNGRADE:
864 op->status = nfsd4_open_downgrade(rqstp, current_fh, &op->u.open_downgrade); 861 op->status = nfsd4_open_downgrade(rqstp, current_fh, &op->u.open_downgrade, &replay_owner);
865 replay_owner = op->u.open_downgrade.od_stateowner;
866 break; 862 break;
867 case OP_PUTFH: 863 case OP_PUTFH:
868 op->status = nfsd4_putfh(rqstp, current_fh, &op->u.putfh); 864 op->status = nfsd4_putfh(rqstp, current_fh, &op->u.putfh);