diff options
author | Jeff Layton <[email protected]> | 2022-08-24 09:24:42 -0400 |
---|---|---|
committer | Ilya Dryomov <[email protected]> | 2022-10-04 19:18:08 +0200 |
commit | b4b924c7a16e857b0715603456045251a49f2ea6 (patch) | |
tree | 38708e8f57d14ba7a2f5c4521af7ddbd1957d7c9 | |
parent | aa1d627207cace003163dee24d1c06fa4e910c6b (diff) |
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 <[email protected]>
Reviewed-by: Xiubo Li <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
-rw-r--r-- | fs/ceph/inode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index b4a3cb07d5b0..a5e2eb5704c9 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; |