diff options
author | Jeff Layton <jlayton@kernel.org> | 2021-06-04 18:03:09 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2021-06-29 00:15:52 +0200 |
commit | 52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9 (patch) | |
tree | 5cd52b763fe50a2fafbf775519803e029ee6bb2b /fs/ceph/mds_client.h | |
parent | ceph: allow ceph_put_mds_session to take NULL or ERR_PTR (diff) | |
download | linux-52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9.tar.xz linux-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.h | 6 |
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; |