summaryrefslogtreecommitdiff
path: root/fs/ceph/acl.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-06-01 17:08:00 +0800
committerIlya Dryomov <idryomov@gmail.com>2017-06-14 19:37:23 +0200
commit4ca2fea6f8277ab381bd08b996d641255b6f7b00 (patch)
tree41f6e229a7e7c5279f94512e72b088adc30bd66a /fs/ceph/acl.c
parent56199016e8672feb7b903eda003a863d5bf2b8c4 (diff)
ceph: unify inode i_ctime update
Current __ceph_setattr() can set inode's i_ctime to current_time(), req->r_stamp or attr->ia_ctime. These time stamps may have minor differences. It may cause potential problem. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/acl.c')
-rw-r--r--fs/ceph/acl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c
index 987044bca1c2..59cb307b15fb 100644
--- a/fs/ceph/acl.c
+++ b/fs/ceph/acl.c
@@ -131,6 +131,7 @@ int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type)
}
if (new_mode != old_mode) {
+ newattrs.ia_ctime = current_time(inode);
newattrs.ia_mode = new_mode;
newattrs.ia_valid = ATTR_MODE;
ret = __ceph_setattr(inode, &newattrs);