From: Ralph Boehme Date: Sat, 6 Dec 2025 15:58:24 +0000 (+0100) Subject: s3/locking: pass persistent to brl_lock() and add it to struct lock_struct X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da8427f2a6a1637158a0a6e98be3616af2dcedc2;p=thirdparty%2Fsamba.git s3/locking: pass persistent to brl_lock() and add it to struct lock_struct Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/include/locking.h b/source3/include/locking.h index 695c6af8144..66532be4c8b 100644 --- a/source3/include/locking.h +++ b/source3/include/locking.h @@ -75,6 +75,7 @@ struct lock_struct { uint64_t fnum; enum brl_type lock_type; enum brl_flavour lock_flav; + bool persistent; }; struct smbd_lock_element { diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 029fb920630..f46147b7153 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -937,6 +937,7 @@ NTSTATUS brl_lock( br_off size, enum brl_type lock_type, enum brl_flavour lock_flav, + bool persistent, struct server_id *blocker_pid, uint64_t *psmblctx) { @@ -953,7 +954,8 @@ NTSTATUS brl_lock( .size = size, .fnum = br_lck->fsp->fnum, .lock_type = lock_type, - .lock_flav = lock_flav + .lock_flav = lock_flav, + .persistent = persistent, }; if (lock_flav == WINDOWS_LOCK) { diff --git a/source3/locking/locking.c b/source3/locking/locking.c index f3f51682e68..22691896bda 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -324,6 +324,7 @@ NTSTATUS do_lock(struct byte_range_lock *br_lck, count, lock_type, lock_flav, + fsp->op->global->persistent, &blocker_pid, &blocker_smblctx); brl_req_set(br_lck, NULL, NULL); diff --git a/source3/locking/proto.h b/source3/locking/proto.h index e12c34712a4..0cb19a25a56 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -55,6 +55,7 @@ NTSTATUS brl_lock( br_off size, enum brl_type lock_type, enum brl_flavour lock_flav, + bool persistent, struct server_id *blocker_pid, uint64_t *psmblctx); bool brl_unlock(struct byte_range_lock *br_lck,