From: Stefan Metzmacher Date: Mon, 6 Jan 2025 16:07:11 +0000 (+0100) Subject: s3/brlock: add brl_req_set() X-Git-Tag: tevent-0.17.0~423 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9c04c7d75dee0c3e6e843b581624a3852042057;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 --- diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 47103d9b8a0..1b864cd5e50 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 524d1d6d145..14744fec814 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);