s3 sticky write time: Removed unused args and tighten up a function by making an...
authorTim Prouty <tprouty@samba.org>
Thu, 2 Jul 2009 17:27:01 +0000 (10:27 -0700)
committerTim Prouty <tprouty@samba.org>
Mon, 6 Jul 2009 22:38:41 +0000 (15:38 -0700)
source3/include/proto.h
source3/locking/locking.c
source3/smbd/dosmode.c
source3/smbd/trans2.c

index 1e44823abc50cfe2ce86c45de5374e0568b0b921..6bd37efc5748b19dfcb8459957067ceba09f9c4b 100644 (file)
@@ -3474,7 +3474,8 @@ NTSTATUS can_set_delete_on_close(files_struct *fsp, bool delete_on_close,
 void set_delete_on_close_token(struct share_mode_lock *lck, const UNIX_USER_TOKEN *tok);
 void set_delete_on_close_lck(struct share_mode_lock *lck, bool delete_on_close, const UNIX_USER_TOKEN *tok);
 bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const UNIX_USER_TOKEN *tok);
-bool set_sticky_write_time(struct file_id fileid, struct timespec write_time);
+bool set_sticky_write_time(const struct file_id fileid,
+                          struct timespec write_time);
 bool set_write_time(struct file_id fileid, struct timespec write_time);
 int share_mode_forall(void (*fn)(const struct share_mode_entry *, const char *,
                                 const char *, void *),
@@ -6242,8 +6243,8 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
                     uint32 dosmode, const char *parent_dir, bool newfile);
 int file_ntimes(connection_struct *conn, const char *fname,
                struct smb_file_time *ft, const SMB_STRUCT_STAT *psbuf);
-bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
-                        struct file_id fileid, const struct timespec mtime);
+bool set_sticky_write_time_path(struct file_id fileid,
+                               const struct timespec mtime);
 bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec mtime);
 bool update_write_time(struct files_struct *fsp);
 
index dd735be88a32835d722c260e7b02449d464b3ad1..78064cfcf9bdb4ecda0d0254f5fac5d7d8d7f5bc 100644 (file)
@@ -1415,7 +1415,8 @@ bool set_delete_on_close(files_struct *fsp, bool delete_on_close, const UNIX_USE
        return True;
 }
 
-bool set_sticky_write_time(struct file_id fileid, struct timespec write_time)
+bool set_sticky_write_time(const struct file_id fileid,
+                          struct timespec write_time)
 {
        struct share_mode_lock *lck;
 
index 2006b75d527850598e8a83a53dcd9a0ba523e7c6..97d788218d56b68c5c31f4eca7b9e1d0df0ce6c6 100644 (file)
@@ -791,8 +791,8 @@ int file_ntimes(connection_struct *conn, const char *fname,
  returned on all future write time queries and set on close.
 ******************************************************************/
 
-bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
-                        struct file_id fileid, const struct timespec mtime)
+bool set_sticky_write_time_path(const struct file_id fileid,
+                               const struct timespec mtime)
 {
        if (null_timespec(mtime)) {
                return true;
@@ -815,8 +815,7 @@ bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec m
        fsp->write_time_forced = true;
        TALLOC_FREE(fsp->update_write_time_event);
 
-       return set_sticky_write_time_path(fsp->conn, fsp->fsp_name,
-                       fsp->file_id, mtime);
+       return set_sticky_write_time_path(fsp->file_id, mtime);
 }
 
 /******************************************************************
index 2c74c8f49e3785cd746d1919a9d8244b8336a8b0..e93d3138218ecb2c6bc8deec011766dfda2f7ba3 100644 (file)
@@ -5009,9 +5009,8 @@ NTSTATUS smb_set_file_time(connection_struct *conn,
                                set_sticky_write_time_fsp(fsp, ft->mtime);
                        }
                } else {
-                       set_sticky_write_time_path(conn, fname,
-                                           vfs_file_id_from_sbuf(conn, psbuf),
-                                           ft->mtime);
+                       set_sticky_write_time_path(
+                               vfs_file_id_from_sbuf(conn, psbuf), ft->mtime);
                }
        }