diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-06-01 11:08:00 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-06-14 19:37:23 +0200 |
commit | 4ca2fea6f8277ab381bd08b996d641255b6f7b00 (patch) | |
tree | 41f6e229a7e7c5279f94512e72b088adc30bd66a /fs/ceph/acl.c | |
parent | ceph: use current_kernel_time() to get request time stamp (diff) | |
download | linux-4ca2fea6f8277ab381bd08b996d641255b6f7b00.tar.xz linux-4ca2fea6f8277ab381bd08b996d641255b6f7b00.zip |
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.c | 1 |
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); |