From 3f54fcaffd771c098f1cc587c66d2e171494447c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Nov 2020 12:53:03 +0100 Subject: [PATCH] smbd: Move setting d->modified=true to reset_share_mode_entry() This function is only called from vfs_default_durable_reconnect(). It is really the lower-level routine that triggers the write of the locking.tdb record. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/locking/share_mode_lock.c | 1 + source3/smbd/durable.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 6ac6016e5e0..0996ab59b02 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -2399,6 +2399,7 @@ bool reset_share_mode_entry( } d->have_share_modes = true; + d->modified = true; ret = true; done: TALLOC_FREE(ltdb); diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c index 5a1dd79832c..981cab1bc21 100644 --- a/source3/smbd/durable.c +++ b/source3/smbd/durable.c @@ -928,10 +928,6 @@ NTSTATUS vfs_default_durable_reconnect(struct connection_struct *conn, DEBUG(10, ("vfs_default_durable_reconnect: opened file '%s'\n", fsp_str_dbg(fsp))); - /* - * release the sharemode lock: this writes the changes - */ - lck->data->modified = true; TALLOC_FREE(lck); *result = fsp; -- 2.47.3