diff options
author | Kotresh HR <khiremat@redhat.com> | 2019-08-08 10:05:12 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-08-20 16:52:24 +0000 |
commit | 95f71df31dc73d85df722b0e7d3a7eb1e0237e7f (patch) | |
tree | a8874e7f0064026a2d00ebeb04318222501250de /xlators/storage/posix/src/posix-inode-fd-ops.c | |
parent | 72fe2bd9ae0ca223d8a320ca124c2837a1571d82 (diff) |
ctime: Fix ctime issue with utime family of syscalls
When atime|mtime is updated via utime family of syscalls,
ctime is not updated. This patch fixes the same.
Change-Id: I7f86d8f8a1e06a332c3449b5bbdbf128c9690f25
fixes: bz#1738786
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-inode-fd-ops.c')
-rw-r--r-- | xlators/storage/posix/src/posix-inode-fd-ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index e2dfd04db76..27b622346e5 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -423,8 +423,8 @@ posix_setattr(call_frame_t *frame, xlator_t *this, loc_t *loc, real_path, loc->path); goto out; } - posix_update_utime_in_mdata(this, real_path, -1, loc->inode, stbuf, - valid); + posix_update_utime_in_mdata(this, real_path, -1, loc->inode, + &frame->root->ctime, stbuf, valid); } if (valid & GF_SET_ATTR_CTIME && !priv->ctime) { @@ -651,8 +651,8 @@ posix_fsetattr(call_frame_t *frame, xlator_t *this, fd_t *fd, fd); goto out; } - posix_update_utime_in_mdata(this, NULL, pfd->fd, fd->inode, stbuf, - valid); + posix_update_utime_in_mdata(this, NULL, pfd->fd, fd->inode, + &frame->root->ctime, stbuf, valid); } if (!valid) { |