diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-11-27 05:47:46 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-01-29 20:36:07 +0300 |
commit | 97aeb6bf988e0830fd80dca724fd89526b3f35e4 (patch) | |
tree | 8c5b049cc7c3572a1cf288958a9ca44af36523c5 /fs/ceph/super.h | |
parent | 8d8f371c83838d74bc3d0708afba631488a12201 (diff) | |
download | linux-97aeb6bf988e0830fd80dca724fd89526b3f35e4.tar.xz |
ceph: use atomic_t for ceph_inode_info::i_shared_gen
It allows accessing i_shared_gen without holding i_ceph_lock. It is
preparation for later patch.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 2beeec07fa76..75701c199b2b 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -256,7 +256,8 @@ struct ceph_inode_xattr { */ struct ceph_dentry_info { struct ceph_mds_session *lease_session; - u32 lease_gen, lease_shared_gen; + int lease_shared_gen; + u32 lease_gen; u32 lease_seq; unsigned long lease_renew_after, lease_renew_from; struct list_head lru; @@ -353,7 +354,7 @@ struct ceph_inode_info { int i_rd_ref, i_rdcache_ref, i_wr_ref, i_wb_ref; int i_wrbuffer_ref, i_wrbuffer_ref_head; atomic_t i_filelock_ref; - u32 i_shared_gen; /* increment each time we get FILE_SHARED */ + atomic_t i_shared_gen; /* increment each time we get FILE_SHARED */ u32 i_rdcache_gen; /* incremented each time we get FILE_CACHE. */ u32 i_rdcache_revoking; /* RDCACHE gen to async invalidate, if any */ |