summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 330fe80faad..64704c5d440 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -629,8 +629,11 @@ posix_do_utimes (xlator_t *this,
tv[1].tv_sec = stbuf->ia_mtime;
tv[1].tv_usec = stbuf->ia_mtime_nsec / 1000;
- ret = utimes (path, tv);
-
+ ret = lutimes (path, tv);
+ if ((ret == -1) && (errno == ENOSYS)) {
+ ret = utimes (path, tv);
+ }
+
return ret;
}