From: Stefan Metzmacher Date: Mon, 6 Jan 2025 16:07:11 +0000 (+0100) Subject: s3/brlock: add brl_req_set() X-Git-Tag: samba-4.22.1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da0318317e62cca82db14922db48aeda8b870de9;p=thirdparty%2Fsamba.git s3/brlock: add brl_req_set() BUG: https://bugzilla.samba.org/show_bug.cgi?id=15767 Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme (cherry picked from commit c9c04c7d75dee0c3e6e843b581624a3852042057) --- diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index c75b83c048d..51d9dc2e599 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -84,6 +84,15 @@ struct files_struct *brl_fsp(struct byte_range_lock *brl) return brl->fsp; } + +void brl_req_set(struct byte_range_lock *br_lck, + TALLOC_CTX *req_mem_ctx, + const struct GUID *req_guid) +{ + br_lck->req_mem_ctx = req_mem_ctx; + br_lck->req_guid = req_guid; +} + TALLOC_CTX *brl_req_mem_ctx(const struct byte_range_lock *brl) { if (brl->req_mem_ctx == NULL) { diff --git a/source3/locking/proto.h b/source3/locking/proto.h index 8e03ad8cf5a..89a9f01bb57 100644 --- a/source3/locking/proto.h +++ b/source3/locking/proto.h @@ -32,6 +32,9 @@ void brl_shutdown(void); unsigned int brl_num_locks(const struct byte_range_lock *brl); struct files_struct *brl_fsp(struct byte_range_lock *brl); +void brl_req_set(struct byte_range_lock *br_lck, + TALLOC_CTX *req_mem_ctx, + const struct GUID *req_guid); TALLOC_CTX *brl_req_mem_ctx(const struct byte_range_lock *brl); const struct GUID *brl_req_guid(const struct byte_range_lock *brl);