From e5385142987202a67fc3667506ee233f2c726107 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 13 Aug 2019 16:14:23 +0200 Subject: s3:smb2_lock: move from 'blocking' to 'state->blocking' This will simplify the next commits. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14113 Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke (cherry picked from commit f13d13ae9da3072862a781bc926e7a06e8384337) --- source3/smbd/smb2_lock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c index e9c8d7f890e..4cf735ff48d 100644 --- a/source3/smbd/smb2_lock.c +++ b/source3/smbd/smb2_lock.c @@ -42,6 +42,7 @@ struct smbd_smb2_lock_state { struct smbd_smb2_request *smb2req; struct smb_request *smb1req; struct files_struct *fsp; + bool blocking; uint16_t lock_count; struct smbd_lock_element *locks; }; @@ -200,7 +201,6 @@ static struct tevent_req *smbd_smb2_lock_send(TALLOC_CTX *mem_ctx, { struct tevent_req *req; struct smbd_smb2_lock_state *state; - bool blocking = false; bool isunlock = false; uint16_t i; struct smbd_lock_element *locks; @@ -241,7 +241,7 @@ static struct tevent_req *smbd_smb2_lock_send(TALLOC_CTX *mem_ctx, tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER); return tevent_req_post(req, ev); } - blocking = true; + state->blocking = true; break; case SMB2_LOCK_FLAG_SHARED|SMB2_LOCK_FLAG_FAIL_IMMEDIATELY: @@ -383,7 +383,7 @@ static struct tevent_req *smbd_smb2_lock_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - if (blocking && + if (state->blocking && (NT_STATUS_EQUAL(status, NT_STATUS_LOCK_NOT_GRANTED) || NT_STATUS_EQUAL(status, NT_STATUS_FILE_LOCK_CONFLICT))) { struct tevent_req *subreq; -- cgit v1.2.1