mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
s3:smbd/durable: trigger pending write_time updates before disconnecting the file
We need to call the pending write time update handler immediately. Which means we don't wait exactly 2 seconds before updating the write time after the first write. metze Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
81d0b8aebf
commit
9e7bce5370
@ -173,6 +173,14 @@ NTSTATUS vfs_default_durable_disconnect(struct files_struct *fsp,
|
||||
return NT_STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* Ensure any pending write time updates are done. */
|
||||
if (fsp->update_write_time_event) {
|
||||
update_write_time_handler(fsp->conn->sconn->ev_ctx,
|
||||
fsp->update_write_time_event,
|
||||
timeval_current(),
|
||||
(void *)fsp);
|
||||
}
|
||||
|
||||
/*
|
||||
* The above checks are done in mark_share_mode_disconnected() too
|
||||
* but we want to avoid getting the lock if possible
|
||||
|
Loading…
Reference in New Issue
Block a user