s3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up again
authorStefan Metzmacher <metze@samba.org>
Fri, 8 Jun 2012 10:05:56 +0000 (12:05 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sun, 17 Jun 2012 19:00:55 +0000 (21:00 +0200)
metze

Signed-off-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_lock.c

index 28612aea8a68314257d178a387ee9de138b80c48..f4611eb06dd004b442882048196d65300f868bf3 100644 (file)
@@ -866,10 +866,8 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct *fsp,
                struct smbd_smb2_lock_state *state = NULL;
                files_struct *fsp_curr = NULL;
                int i = smb2req->current_idx;
-               uint64_t in_file_id_volatile;
                struct blocking_lock_record *blr = NULL;
                const uint8_t *inhdr;
-               const uint8_t *inbody;
 
                nextreq = smb2req->next;
 
@@ -888,9 +886,6 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct *fsp,
                        continue;
                }
 
-               inbody = (const uint8_t *)smb2req->in.vector[i+1].iov_base;
-               in_file_id_volatile = BVAL(inbody, 0x10);
-
                state = tevent_req_data(smb2req->subreq,
                                struct smbd_smb2_lock_state);
                if (!state) {
@@ -898,7 +893,7 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct *fsp,
                        continue;
                }
 
-               fsp_curr = file_fsp(state->smb1req, (uint16_t)in_file_id_volatile);
+               fsp_curr = smb2req->compat_chain_fsp;
                if (fsp_curr == NULL) {
                        /* Strange - is this even possible ? */
                        continue;