summaryrefslogtreecommitdiff
path: root/source3/smbd/durable.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-10-19 10:54:27 +0200
committerMichael Adam <obnox@samba.org>2012-10-19 15:09:58 +0200
commit9e7bce53707732700928eaf2bb53a5f1cc5d7784 (patch)
tree0600b59ba254a461538f50ae608e5175948daef5 /source3/smbd/durable.c
parent81d0b8aebf8e7dee73907fabf408f0b2c3145207 (diff)
downloadsamba-9e7bce53707732700928eaf2bb53a5f1cc5d7784.tar.gz
samba-9e7bce53707732700928eaf2bb53a5f1cc5d7784.tar.bz2
samba-9e7bce53707732700928eaf2bb53a5f1cc5d7784.zip
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>
Diffstat (limited to 'source3/smbd/durable.c')
-rw-r--r--source3/smbd/durable.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c
index 42ad18e5b6..feec0dad6e 100644
--- a/source3/smbd/durable.c
+++ b/source3/smbd/durable.c
@@ -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