From: Volker Lendecke Date: Thu, 16 May 2024 10:05:38 +0000 (+0200) Subject: smbd: Remove a no-op call to init_strict_lock_struct X-Git-Tag: tdb-1.4.11~621 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff43158c5286f664f4eefd0b8e135960aa2d1109;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index db0aca7ac68..6c595a7c340 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -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; }