diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index c5eeb68f2c6..32de2a4a018 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -1244,24 +1244,6 @@ done: return ret; } -/****************************************************************** - Force a "sticky" write time on a pathname. This will always be - returned on all future write time queries and set on close. -******************************************************************/ - -bool set_sticky_write_time_path(struct file_id fileid, struct timespec mtime) -{ - if (is_omit_timespec(&mtime)) { - return true; - } - - if (!set_sticky_write_time(fileid, mtime)) { - return false; - } - - return true; -} - /****************************************************************** Force a "sticky" write time on an fsp. This will always be returned on all future write time queries and set on close. @@ -1269,6 +1251,8 @@ bool set_sticky_write_time_path(struct file_id fileid, struct timespec mtime) bool set_sticky_write_time_fsp(struct files_struct *fsp, struct timespec mtime) { + bool ok; + if (is_omit_timespec(&mtime)) { return true; } @@ -1276,7 +1260,8 @@ bool set_sticky_write_time_fsp(struct files_struct *fsp, struct timespec mtime) fsp->fsp_flags.write_time_forced = true; TALLOC_FREE(fsp->update_write_time_event); - return set_sticky_write_time_path(fsp->file_id, mtime); + ok = set_sticky_write_time(fsp->file_id, mtime); + return ok; } /****************************************************************** diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 429d8875f0a..93c3dcff07a 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -216,7 +216,6 @@ NTSTATUS file_set_sparse(connection_struct *conn, int file_ntimes(connection_struct *conn, files_struct *fsp, struct smb_file_time *ft); -bool set_sticky_write_time_path(struct file_id fileid, struct timespec mtime); bool set_sticky_write_time_fsp(struct files_struct *fsp, struct timespec mtime);