From eb8d1265dc053086e9fb802eec0f91dff2ee6aee Mon Sep 17 00:00:00 2001 From: Noel Power Date: Thu, 10 Jun 2021 11:32:06 +0100 Subject: [PATCH] s3/smbd: dos_mode_check_compressed: remove smb_fname, conn fn parms smb_fname is unused and we can get conn from the fsp passed in Signed-off-by: Noel Power Reviewed-by: Jeremy Allison --- source3/smbd/dosmode.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 4a7de4d52a1..43c46867122 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -612,9 +612,7 @@ uint32_t dos_mode_msdfs(connection_struct *conn, /* * check whether a file or directory is flagged as compressed. */ -static NTSTATUS dos_mode_check_compressed(connection_struct *conn, - struct files_struct *fsp, - struct smb_filename *smb_fname, +static NTSTATUS dos_mode_check_compressed(struct files_struct *fsp, bool *is_compressed) { NTSTATUS status; @@ -625,7 +623,7 @@ static NTSTATUS dos_mode_check_compressed(connection_struct *conn, goto err_out; } - status = SMB_VFS_FGET_COMPRESSION(conn, tmp_ctx, fsp, + status = SMB_VFS_FGET_COMPRESSION(fsp->conn, tmp_ctx, fsp, &compression_fmt); if (!NT_STATUS_IS_OK(status)) { goto err_ctx_free; @@ -710,8 +708,7 @@ static uint32_t dos_mode_post(uint32_t dosmode, if (fsp->conn->fs_capabilities & FILE_FILE_COMPRESSION) { bool compressed = false; - status = dos_mode_check_compressed(fsp->conn, fsp, smb_fname, - &compressed); + status = dos_mode_check_compressed(fsp, &compressed); if (NT_STATUS_IS_OK(status) && compressed) { dosmode |= FILE_ATTRIBUTE_COMPRESSED; }