summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-08-07 12:38:31 -0700
committerJeremy Allison <jra@samba.org>2009-08-07 12:38:31 -0700
commitd296c774c5981baa863c697782dba1b6280d632e (patch)
tree5db485d7343b40143198e43a5f716ffc4f15ba0f /source3/modules
parentea6819ae7565c22b0d6276acebfbab472a4e4c18 (diff)
downloadsamba-d296c774c5981baa863c697782dba1b6280d632e.tar.gz
samba-d296c774c5981baa863c697782dba1b6280d632e.tar.bz2
samba-d296c774c5981baa863c697782dba1b6280d632e.zip
Move the checks for null timestamps down below the VFS_NTIMES
layer (as it's done in onefs). This simplifies greatly the code in smb_set_file_time() w.r.t. changenotify messages. Jeremy.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_default.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index a4922e7e05..2ee2fd1249 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -780,6 +780,21 @@ static int vfswrap_ntimes(vfs_handle_struct *handle,
goto out;
}
+ if (null_timespec(ft->atime)) {
+ ft->atime= smb_fname->st.st_ex_atime;
+ }
+
+ if (null_timespec(ft->mtime)) {
+ ft->mtime = smb_fname->st.st_ex_mtime;
+ }
+
+ if ((timespec_compare(&ft->atime,
+ &smb_fname->st.st_ex_atime) == 0) &&
+ (timespec_compare(&ft->mtime,
+ &smb_fname->st.st_ex_mtime) == 0)) {
+ return 0;
+ }
+
#if defined(HAVE_UTIMES)
if (ft != NULL) {
struct timeval tv[2];