diff options
Diffstat (limited to 'xlators/features/utime/src/utime-helpers.c')
-rw-r--r-- | xlators/features/utime/src/utime-helpers.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/xlators/features/utime/src/utime-helpers.c b/xlators/features/utime/src/utime-helpers.c index 2d74bc76e07..c79e12badfa 100644 --- a/xlators/features/utime/src/utime-helpers.c +++ b/xlators/features/utime/src/utime-helpers.c @@ -9,6 +9,7 @@ */ #include "utime-helpers.h" +#include "utime.h" void gl_timespec_get(struct timespec *ts) @@ -21,12 +22,17 @@ gl_timespec_get(struct timespec *ts) } void -utime_update_attribute_flags(call_frame_t *frame, glusterfs_fop_t fop) +utime_update_attribute_flags(call_frame_t *frame, xlator_t *this, + glusterfs_fop_t fop) { - if (!frame) { + utime_priv_t *utime_priv = NULL; + + if (!frame || !this) { goto out; } + utime_priv = this->private; + switch (fop) { case GF_FOP_SETXATTR: case GF_FOP_FSETXATTR: @@ -42,9 +48,10 @@ utime_update_attribute_flags(call_frame_t *frame, glusterfs_fop_t fop) case GF_FOP_OPENDIR: case GF_FOP_OPEN: case GF_FOP_READ: - frame->root->flags |= MDATA_ATIME; + if (!utime_priv->noatime) { + frame->root->flags |= MDATA_ATIME; + } break; - case GF_FOP_MKNOD: case GF_FOP_MKDIR: case GF_FOP_SYMLINK: |