Revert "no-atime-on-mtime"
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Jan 2008 19:55:42 +0000 (20:55 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 3 Jan 2008 19:55:42 +0000 (20:55 +0100)
This reverts commit 54adb86890eb22b6bcf0bc1163662c3f9c075777.

Sorry I didn't want to push that...

metze

source/smbd/dosmode.c

index e6d2309c291b4c66b0d11ccaa2279dfb4d0fa6b1..28d8a77a9621466e9e688a4b86585842086171ea 100644 (file)
@@ -605,21 +605,14 @@ int file_ntimes(connection_struct *conn, const char *fname, const struct timespe
 BOOL set_filetime(connection_struct *conn, const char *fname,
                const struct timespec mtime)
 {
-       SMB_STRUCT_STAT sbuf;
        struct timespec ts[2];
 
        if (null_timespec(mtime)) {
                return(True);
        }
 
-       ZERO_STRUCT(sbuf);
-
-       if (SMB_VFS_STAT(conn,fname,&sbuf) == -1) {
-               return False;
-       }
-
-       ts[0] = get_atimespec(&sbuf); /* atime. */
        ts[1] = mtime; /* mtime. */
+       ts[0] = ts[1]; /* atime. */
 
        if (file_ntimes(conn, fname, ts)) {
                DEBUG(4,("set_filetime(%s) failed: %s\n",fname,strerror(errno)));