aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2013-03-22 17:44:19 -0400
committerJ. Bruce Fields <bfields@redhat.com>2013-04-09 09:08:55 -0400
commit3d74e6a5b6b0d1e4786d1596081bed6ab63a4cac (patch)
tree80751e19acc1febbb28252934385266ea8c234a2 /fs/nfsd
parentc383747ef674467d02dd9c9320a47de2067b0ce3 (diff)
nfsd4: no need for replay_owner in sessions case
The replay_owner will never be used in the sessions case. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4proc.c2
-rw-r--r--fs/nfsd/nfs4state.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 609e1e211330..c97bb424f55f 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -413,7 +413,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
413 WARN_ON(status && open->op_created); 413 WARN_ON(status && open->op_created);
414out: 414out:
415 nfsd4_cleanup_open_state(open, status); 415 nfsd4_cleanup_open_state(open, status);
416 if (open->op_openowner) 416 if (open->op_openowner && !nfsd4_has_session(cstate))
417 cstate->replay_owner = &open->op_openowner->oo_owner; 417 cstate->replay_owner = &open->op_openowner->oo_owner;
418 nfsd4_bump_seqid(cstate, status); 418 nfsd4_bump_seqid(cstate, status);
419 if (!cstate->replay_owner) 419 if (!cstate->replay_owner)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 1226ff6030bd..16db25dc364f 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3666,7 +3666,8 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid,
3666 if (status) 3666 if (status)
3667 return status; 3667 return status;
3668 *stpp = openlockstateid(s); 3668 *stpp = openlockstateid(s);
3669 cstate->replay_owner = (*stpp)->st_stateowner; 3669 if (!nfsd4_has_session(cstate))
3670 cstate->replay_owner = (*stpp)->st_stateowner;
3670 3671
3671 return nfs4_seqid_op_checks(cstate, stateid, seqid, *stpp); 3672 return nfs4_seqid_op_checks(cstate, stateid, seqid, *stpp);
3672} 3673}
@@ -3858,10 +3859,9 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
3858 oo->oo_last_closed_stid = stp; 3859 oo->oo_last_closed_stid = stp;
3859 3860
3860 if (list_empty(&oo->oo_owner.so_stateids)) { 3861 if (list_empty(&oo->oo_owner.so_stateids)) {
3861 if (cstate->minorversion) { 3862 if (cstate->minorversion)
3862 release_openowner(oo); 3863 release_openowner(oo);
3863 cstate->replay_owner = NULL; 3864 else {
3864 } else {
3865 /* 3865 /*
3866 * In the 4.0 case we need to keep the owners around a 3866 * In the 4.0 case we need to keep the owners around a
3867 * little while to handle CLOSE replay. 3867 * little while to handle CLOSE replay.