From: Jeff Layton Date: Wed, 24 Aug 2022 13:24:42 +0000 (-0400) Subject: ceph: increment i_version when doing a setattr with caps X-Git-Tag: v6.1-rc1~37^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b4b924c7a16e857b0715603456045251a49f2ea6;p=users%2Fdwmw2%2Flinux.git 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 Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov --- 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;