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

s3:smbd: let update_write_time_on_close() use share_mode_{old,changed}_write_time()

We're already holding a share_mode_lock, so we can use it directly.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2022-08-30 05:57:48 +00:00 committed by Jeremy Allison
parent b9edf3c642
commit 1288989f0f

View File

@ -608,12 +608,12 @@ static NTSTATUS update_write_time_on_close(struct files_struct *fsp)
NTTIME share_mtime = share_mode_changed_write_time(lck);
/* On close if we're changing the real file time we
* must update it in the open file db too. */
(void)set_write_time(fsp->file_id, fsp->close_write_time);
share_mode_set_old_write_time(lck, fsp->close_write_time);
/* Close write times overwrite sticky write times
so we must replace any sticky write time here. */
if (!null_nttime(share_mtime)) {
(void)set_sticky_write_time(fsp->file_id, fsp->close_write_time);
share_mode_set_changed_write_time(lck, fsp->close_write_time);
}
TALLOC_FREE(lck);
}