mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
s3:locking: protect do_lock() with share_mode_do_locked_vfs_allowed()
share_mode_do_locked() will be make static soon. Here we just want to avoid concurrent access to brlock.tdb in order to maintain the lock order, we're not interested in the locking.tdb content at all, expect that there's at least one entry. 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:
parent
7c6113de2b
commit
0d5a960381
@ -253,9 +253,7 @@ struct do_lock_state {
|
||||
};
|
||||
|
||||
static void do_lock_fn(
|
||||
const uint8_t *buf,
|
||||
size_t buflen,
|
||||
bool *modified_dependent,
|
||||
struct share_mode_lock *lck,
|
||||
void *private_data)
|
||||
{
|
||||
struct do_lock_state *state = private_data;
|
||||
@ -334,7 +332,9 @@ NTSTATUS do_lock(files_struct *fsp,
|
||||
fsp_fnum_dbg(fsp),
|
||||
fsp_str_dbg(fsp));
|
||||
|
||||
status = share_mode_do_locked(fsp->file_id, do_lock_fn, &state);
|
||||
status = share_mode_do_locked_vfs_allowed(fsp->file_id,
|
||||
do_lock_fn,
|
||||
&state);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DBG_DEBUG("share_mode_do_locked returned %s\n",
|
||||
nt_errstr(status));
|
||||
|
Loading…
x
Reference in New Issue
Block a user