summaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng2017-11-27 03:47:46 +0100
committerIlya Dryomov2018-01-29 18:36:07 +0100
commit97aeb6bf988e0830fd80dca724fd89526b3f35e4 (patch)
tree8c5b049cc7c3572a1cf288958a9ca44af36523c5 /fs/ceph/caps.c
parentceph: cleanup traceless reply handling for rename (diff)
downloadkernel-qcow2-linux-97aeb6bf988e0830fd80dca724fd89526b3f35e4.tar.gz
kernel-qcow2-linux-97aeb6bf988e0830fd80dca724fd89526b3f35e4.tar.xz
kernel-qcow2-linux-97aeb6bf988e0830fd80dca724fd89526b3f35e4.zip
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);