From: Jeremy Allison Date: Tue, 8 Jun 2021 18:15:59 +0000 (-0700) Subject: s3: smbd: can_delete_file_in_directory(), we no longer need to do the SMB_VFS_STAT... X-Git-Tag: tevent-0.11.0~530 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=120ce4f56f5ead293de6729b123b2d1ad3e60c6b;p=thirdparty%2Fsamba.git s3: smbd: can_delete_file_in_directory(), we no longer need to do the SMB_VFS_STAT() call. All code paths must have a valid stat here. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index 71469fea31c..0f3ad4ba844 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -71,10 +71,7 @@ bool can_delete_file_in_directory(connection_struct *conn, } } - if(SMB_VFS_STAT(conn, smb_fname_parent) != 0) { - ret = false; - goto out; - } + SMB_ASSERT(VALID_STAT(smb_fname_parent->st)); /* fast paths first */