summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2014-07-29 21:34:30 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-07-31 14:20:21 -0400
commite4f1dd7fc23f92efdaaa07d001b3dd5391505580 (patch)
tree9d05f9a4311f21b18e97e0daaa6319ed758d5afd /fs/nfsd
parent8f4b54c53f0d9c67cf922c8a780b8d9075e20e07 (diff)
downloadop-kernel-dev-e4f1dd7fc23f92efdaaa07d001b3dd5391505580.zip
op-kernel-dev-e4f1dd7fc23f92efdaaa07d001b3dd5391505580.tar.gz
nfsd: Make lock stateid take a reference to the lockowner
A 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 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 906c860..88225f0 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -928,6 +928,8 @@ static void nfs4_free_lock_stateid(struct nfs4_stid *stid)
file = find_any_file(stp->st_stid.sc_file);
if (file)
filp_close(file, (fl_owner_t)lo);
+ if (stp->st_stateowner)
+ nfs4_put_stateowner(stp->st_stateowner);
nfs4_free_ol_stateid(stid);
}
@@ -4831,6 +4833,7 @@ init_lock_stateid(struct nfs4_ol_stateid *stp, struct nfs4_lockowner *lo,
atomic_inc(&stp->st_stid.sc_count);
stp->st_stid.sc_type = NFS4_LOCK_STID;
stp->st_stateowner = &lo->lo_owner;
+ atomic_inc(&lo->lo_owner.so_count);
get_nfs4_file(fp);
stp->st_stid.sc_file = fp;
stp->st_stid.sc_free = nfs4_free_lock_stateid;
OpenPOWER on IntegriCloud