summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2019-08-13 16:14:23 +0200
committerStefan Metzmacher <metze@samba.org>2019-09-09 16:04:29 +0000
commite5385142987202a67fc3667506ee233f2c726107 (patch)
tree08e29de1d6cfebf6cc9f12e991a0ce298a6e5b68
parent8b3a50609f430ec08add2bbac77b106a585d97c6 (diff)
downloadsamba-e5385142987202a67fc3667506ee233f2c726107.tar.gz
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 <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit f13d13ae9da3072862a781bc926e7a06e8384337)
-rw-r--r--source3/smbd/smb2_lock.c6
1 files 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;