1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

smbd: Inline set_sticky_write_time_path into set_sticky_write_time_fsp

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jennifer Sutton <jsutton@samba.org>
This commit is contained in:
Volker Lendecke 2024-07-25 13:23:21 +02:00
parent 6d356dcbaf
commit 25370c79af
2 changed files with 4 additions and 20 deletions

View File

@ -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;
}
/******************************************************************

View File

@ -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);