diff options
author | Jeff Layton <jlayton@kernel.org> | 2021-06-04 12:03:09 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2021-06-29 00:15:52 +0200 |
commit | 52d60f8e18b855d67ecdc4fa34ae1b894d36c7b9 (patch) | |
tree | 5cd52b763fe50a2fafbf775519803e029ee6bb2b /fs/ceph/dir.c | |
parent | 7e65624d32b6e0429b1d3559e5585657f34f74a1 (diff) |
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/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 973489dafe91..6bd2ad3e0471 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1548,10 +1548,8 @@ static bool __dentry_lease_is_valid(struct ceph_dentry_info *di) u32 gen; unsigned long ttl; - spin_lock(&session->s_gen_ttl_lock); - gen = session->s_cap_gen; + gen = atomic_read(&session->s_cap_gen); ttl = session->s_cap_ttl; - spin_unlock(&session->s_gen_ttl_lock); if (di->lease_gen == gen && time_before(jiffies, ttl) && |