aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 4e50f14f5bc1..8e18ca49555f 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4434,10 +4434,12 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
4434 NFS4_OPEN_STID, &stp, nn); 4434 NFS4_OPEN_STID, &stp, nn);
4435 if (status) 4435 if (status)
4436 goto out; 4436 goto out;
4437 /* FIXME: move into nfs4_preprocess_seqid_op */
4438 atomic_inc(&stp->st_stid.sc_count);
4437 oo = openowner(stp->st_stateowner); 4439 oo = openowner(stp->st_stateowner);
4438 status = nfserr_bad_stateid; 4440 status = nfserr_bad_stateid;
4439 if (oo->oo_flags & NFS4_OO_CONFIRMED) 4441 if (oo->oo_flags & NFS4_OO_CONFIRMED)
4440 goto out; 4442 goto put_stateid;
4441 oo->oo_flags |= NFS4_OO_CONFIRMED; 4443 oo->oo_flags |= NFS4_OO_CONFIRMED;
4442 update_stateid(&stp->st_stid.sc_stateid); 4444 update_stateid(&stp->st_stid.sc_stateid);
4443 memcpy(&oc->oc_resp_stateid, &stp->st_stid.sc_stateid, sizeof(stateid_t)); 4445 memcpy(&oc->oc_resp_stateid, &stp->st_stid.sc_stateid, sizeof(stateid_t));
@@ -4446,6 +4448,8 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
4446 4448
4447 nfsd4_client_record_create(oo->oo_owner.so_client); 4449 nfsd4_client_record_create(oo->oo_owner.so_client);
4448 status = nfs_ok; 4450 status = nfs_ok;
4451put_stateid:
4452 nfs4_put_stid(&stp->st_stid);
4449out: 4453out:
4450 nfsd4_bump_seqid(cstate, status); 4454 nfsd4_bump_seqid(cstate, status);
4451 if (!cstate->replay_owner) 4455 if (!cstate->replay_owner)