]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Move setting d->modified=true to reset_share_mode_entry()
authorVolker Lendecke <vl@samba.org>
Wed, 4 Nov 2020 11:53:03 +0000 (12:53 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 10 Nov 2020 19:49:34 +0000 (19:49 +0000)
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 <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/share_mode_lock.c
source3/smbd/durable.c

index 6ac6016e5e04aff241fe1a2f8ccbb53b1e308c4a..0996ab59b0236e6240f3ce4d25a61b0884d889b2 100644 (file)
@@ -2399,6 +2399,7 @@ bool reset_share_mode_entry(
        }
 
        d->have_share_modes = true;
+       d->modified = true;
        ret = true;
 done:
        TALLOC_FREE(ltdb);
index 5a1dd79832c6ab557a81c00919819946540fd070..981cab1bc2101b618dcc70b2e7defb8ed50afad9 100644 (file)
@@ -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;