summaryrefslogtreecommitdiffstats
path: root/xlators/features/utime/src/utime-gen-fops-c.py
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/utime/src/utime-gen-fops-c.py')
-rwxr-xr-xxlators/features/utime/src/utime-gen-fops-c.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/xlators/features/utime/src/utime-gen-fops-c.py b/xlators/features/utime/src/utime-gen-fops-c.py
index a8637ffe6f6..8730a51d13e 100755
--- a/xlators/features/utime/src/utime-gen-fops-c.py
+++ b/xlators/features/utime/src/utime-gen-fops-c.py
@@ -82,7 +82,18 @@ gf_utime_@NAME@ (call_frame_t *frame, xlator_t *this,
@LONG_ARGS@)
{
gl_timespec_get(&frame->root->ctime);
- frame->root->flags |= MDATA_CTIME;
+
+ if (!valid) {
+ frame->root->flags |= MDATA_CTIME;
+ }
+
+ if (valid & (GF_SET_ATTR_UID | GF_SET_ATTR_GID)) {
+ frame->root->flags |= MDATA_CTIME;
+ }
+
+ if (valid & GF_SET_ATTR_MODE) {
+ frame->root->flags |= MDATA_CTIME;
+ }
STACK_WIND (frame, gf_utime_@NAME@_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->@NAME@, @SHORT_ARGS@);