From: Ralph Boehme Date: Fri, 10 Apr 2020 14:54:53 +0000 (+0200) Subject: smbd: remove redundant conn arg from fd_open_atomic() X-Git-Tag: ldb-2.2.0~412 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0551b22fd17fa3a8d66d1efad7bf27dd36eb20e;p=thirdparty%2Fsamba.git smbd: remove redundant conn arg from fd_open_atomic() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- 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);