summaryrefslogtreecommitdiff
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2019-03-20 20:03:02 -0400
committerJ. Bruce Fields <bfields@redhat.com>2019-07-03 17:52:49 -0400
commit59f8e91b75ecf16f22d62eca0659c13901eff5f3 (patch)
tree71be0a7af288721f33e8c34e5ff6691d9c200098 /fs/nfsd/state.h
parent14ed14cc7c062bbed7821be0a93938dc78a49803 (diff)
nfsd4: use reference count to free client
Keep a second reference count which is what is really used to decide when to free the client's memory. Next I'm going to add an nfsd/clients/ directory with a subdirectory for each NFSv4 client. File objects under nfsd/clients/ will hold these references. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index f79ad7202e82..8eacdbc50cd7 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -348,6 +348,7 @@ struct nfs4_client {
u32 cl_exchange_flags;
/* number of rpc's in progress over an associated session: */
atomic_t cl_rpc_users;
+ struct kref cl_ref;
struct nfs4_op_map cl_spo_must_allow;
/* for nfs41 callbacks */