From c0551b22fd17fa3a8d66d1efad7bf27dd36eb20e Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 10 Apr 2020 16:54:53 +0200 Subject: [PATCH] smbd: remove redundant conn arg from fd_open_atomic() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/open.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 4c102f3ee20..21a8e35984a 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1023,12 +1023,12 @@ static NTSTATUS change_dir_owner_to_parent(connection_struct *conn, file was created or not. ****************************************************************************/ -static NTSTATUS fd_open_atomic(struct connection_struct *conn, - files_struct *fsp, +static NTSTATUS fd_open_atomic(files_struct *fsp, int flags, mode_t mode, bool *file_created) { + struct connection_struct *conn = fsp->conn; NTSTATUS status = NT_STATUS_UNSUCCESSFUL; NTSTATUS retry_status; bool file_existed = VALID_STAT(fsp->fsp_name->st); @@ -1290,8 +1290,7 @@ static NTSTATUS open_file(files_struct *fsp, * Actually do the open - if O_TRUNC is needed handle it * below under the share mode lock. */ - status = fd_open_atomic(conn, - fsp, + status = fd_open_atomic(fsp, local_flags & ~O_TRUNC, unx_mode, p_file_created);