summaryrefslogtreecommitdiff
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-11-27 05:47:46 +0300
committerIlya Dryomov <idryomov@gmail.com>2018-01-29 20:36:07 +0300
commit97aeb6bf988e0830fd80dca724fd89526b3f35e4 (patch)
tree8c5b049cc7c3572a1cf288958a9ca44af36523c5 /fs/ceph/caps.c
parent8d8f371c83838d74bc3d0708afba631488a12201 (diff)
downloadlinux-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/caps.c')
-rw-r--r--fs/ceph/caps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 029cab713731..57120e3d44de 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -498,7 +498,7 @@ static void __check_cap_issue(struct ceph_inode_info *ci, struct ceph_cap *cap,
*/
if ((issued & CEPH_CAP_FILE_SHARED) != (had & CEPH_CAP_FILE_SHARED)) {
if (issued & CEPH_CAP_FILE_SHARED)
- ci->i_shared_gen++;
+ atomic_inc(&ci->i_shared_gen);
if (S_ISDIR(ci->vfs_inode.i_mode)) {
dout(" marking %p NOT complete\n", &ci->vfs_inode);
__ceph_dir_clear_complete(ci);