diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-11-26 21:47:46 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-01-29 12:36:07 -0500 |
commit | 97aeb6bf988e0830fd80dca724fd89526b3f35e4 (patch) | |
tree | 8c5b049cc7c3572a1cf288958a9ca44af36523c5 /fs/ceph/caps.c | |
parent | 8d8f371c83838d74bc3d0708afba631488a12201 (diff) |
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.c | 2 |
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, | |||
498 | */ | 498 | */ |
499 | if ((issued & CEPH_CAP_FILE_SHARED) != (had & CEPH_CAP_FILE_SHARED)) { | 499 | if ((issued & CEPH_CAP_FILE_SHARED) != (had & CEPH_CAP_FILE_SHARED)) { |
500 | if (issued & CEPH_CAP_FILE_SHARED) | 500 | if (issued & CEPH_CAP_FILE_SHARED) |
501 | ci->i_shared_gen++; | 501 | atomic_inc(&ci->i_shared_gen); |
502 | if (S_ISDIR(ci->vfs_inode.i_mode)) { | 502 | if (S_ISDIR(ci->vfs_inode.i_mode)) { |
503 | dout(" marking %p NOT complete\n", &ci->vfs_inode); | 503 | dout(" marking %p NOT complete\n", &ci->vfs_inode); |
504 | __ceph_dir_clear_complete(ci); | 504 | __ceph_dir_clear_complete(ci); |