aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-06-04 12:03:09 -0400
committerIlya Dryomov <idryomov@gmail.com>2021-06-29 00:15:52 +0200
commit52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9 (patch)
tree5cd52b763fe50a2fafbf775519803e029ee6bb2b /fs/ceph/mds_client.h
parentceph: allow ceph_put_mds_session to take NULL or ERR_PTR (diff)
downloadlinux-dev-52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9.tar.xz
linux-dev-52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9.zip
ceph: eliminate session->s_gen_ttl_lock
Turn s_cap_gen field into an atomic_t, and just rely on the fact that we hold the s_mutex when changing the s_cap_ttl field. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Luis Henriques <lhenriques@suse.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r--fs/ceph/mds_client.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index 15c11a0f2caf..20e42d8b66c6 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -186,10 +186,8 @@ struct ceph_mds_session {
struct ceph_auth_handshake s_auth;
- /* protected by s_gen_ttl_lock */
- spinlock_t s_gen_ttl_lock;
- u32 s_cap_gen; /* inc each time we get mds stale msg */
- unsigned long s_cap_ttl; /* when session caps expire */
+ atomic_t s_cap_gen; /* inc each time we get mds stale msg */
+ unsigned long s_cap_ttl; /* when session caps expire. protected by s_mutex */
/* protected by s_cap_lock */
spinlock_t s_cap_lock;