diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-07-30 03:34:20 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-07-31 20:20:13 +0200 |
commit | 8a0b589d8fd0e63579982cbfda099a2e09b52811 (patch) | |
tree | adf3c84e351861ec4e58249171258bd86440d3e9 /fs/nfsd/nfs4state.c | |
parent | nfsd: nfsd4_process_open2() must reference the open stateid (diff) | |
download | linux-8a0b589d8fd0e63579982cbfda099a2e09b52811.tar.xz linux-8a0b589d8fd0e63579982cbfda099a2e09b52811.zip |
nfsd: Prepare nfsd4_close() for open stateid referencing
Prepare nfsd4_close for a future where nfs4_preprocess_seqid_op()
hands it a fully referenced open stateid. Necessary step toward
client_mutex removal.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/nfsd/nfs4state.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index f3018cb26769..4e50f14f5bc1 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -4579,10 +4579,15 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, nfsd4_bump_seqid(cstate, status); if (status) goto out; + /* FIXME: move into nfs4_preprocess_seqid_op */ + atomic_inc(&stp->st_stid.sc_count); update_stateid(&stp->st_stid.sc_stateid); memcpy(&close->cl_stateid, &stp->st_stid.sc_stateid, sizeof(stateid_t)); nfsd4_close_open_stateid(stp); + + /* put reference from nfs4_preprocess_seqid_op */ + nfs4_put_stid(&stp->st_stid); out: if (!cstate->replay_owner) nfs4_unlock_state(); |