aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-08-24 09:24:42 -0400
committerIlya Dryomov <idryomov@gmail.com>2022-10-04 19:18:08 +0200
commitb4b924c7a16e857b0715603456045251a49f2ea6 (patch)
tree38708e8f57d14ba7a2f5c4521af7ddbd1957d7c9 /fs/ceph
parentaa1d627207cace003163dee24d1c06fa4e910c6b (diff)
downloadlinux-b4b924c7a16e857b0715603456045251a49f2ea6.tar.gz
ceph: increment i_version when doing a setattr with caps
When the client has enough caps to satisfy a setattr locally without having to talk to the server, we currently do the setattr without incrementing the change attribute. Ensure that if the ctime changes locally, then the change attribute does too. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index b4a3cb07d5b00..a5e2eb5704c9f 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -2192,6 +2192,7 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr)
inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied,
&prealloc_cf);
inode->i_ctime = attr->ia_ctime;
+ inode_inc_iversion_raw(inode);
}
release &= issued;