summary refs log tree commit diff
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2013-03-19 12:05:39 -0400
committerJ. Bruce Fields <bfields@redhat.com>2013-04-03 11:48:40 -0400
commit66b2b9b2b0e8a9034806293a436628400a44a71d (patch)
treea1a142425240c28f7b942dc665afe77752c82ae1 /fs/nfsd/state.h
parent221a68766973d7a3afe40a05abd8258b5de016a0 (diff)
downloadlinux-66b2b9b2b0e8a9034806293a436628400a44a71d.tar.gz
nfsd4: don't destroy in-use session
This changes session destruction to be similar to client destruction in
that attempts to destroy a session while in use (which should be rare
corner cases) result in DELAY.  This simplifies things somewhat and
helps meet a coming 4.2 requirement.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 07f8a822a6ce..f6ae4db3efdb 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -194,9 +194,11 @@ struct nfsd4_conn {
 };
 
 struct nfsd4_session {
-	struct kref		se_ref;
+	atomic_t		se_ref;
 	struct list_head	se_hash;	/* hash by sessionid */
 	struct list_head	se_perclnt;
+/* See SESSION4_PERSIST, etc. for standard flags; this is internal-only: */
+#define NFS4_SESSION_DEAD	0x010
 	u32			se_flags;
 	struct nfs4_client	*se_client;
 	struct nfs4_sessionid	se_sessionid;