1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

smbd: Remove a no-op call to init_strict_lock_struct

"lock" is a variable on the stack, and initializing it is all that
init_strict_lock_struct does. We've done the corresponding checks
already in smbd_smb2_read_send

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Volker Lendecke 2024-05-16 12:05:38 +02:00 committed by Andrew Bartlett
parent 661532c46c
commit ff43158c52

View File

@ -204,7 +204,6 @@ static int smb2_smb2_read_state_deny_destructor(struct smbd_smb2_read_state *sta
/* struct smbd_smb2_read_state destructor. Send the SMB2_READ data. */
static int smb2_sendfile_send_data(struct smbd_smb2_read_state *state)
{
struct lock_struct lock;
uint32_t in_length = state->in_length;
uint64_t in_offset = state->in_offset;
files_struct *fsp = state->fsp;
@ -332,14 +331,6 @@ normal_read:
}
}
init_strict_lock_struct(fsp,
fsp->op->global->open_persistent_id,
in_offset,
in_length,
READ_LOCK,
lp_posix_cifsu_locktype(fsp),
&lock);
*pstatus = NT_STATUS_OK;
return 0;
}