From: Volker Lendecke Date: Tue, 25 Jun 2024 14:04:53 +0000 (+0200) Subject: smbd: Simplify fdos_mode X-Git-Tag: tdb-1.4.11~258 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e2ba6144657be84f35add7e4c7f7c178f80a4f07;p=thirdparty%2Fsamba.git smbd: Simplify fdos_mode We don't need the outer !NT_STATUS_IS_OK and the comment Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index e0a6f1672b0..51d9c0508fe 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -719,15 +719,11 @@ uint32_t fdos_mode(struct files_struct *fsp) status = SMB_VFS_FGET_DOS_ATTRIBUTES(fsp->conn, metadata_fsp(fsp), &result); - if (!NT_STATUS_IS_OK(status)) { - /* - * Only fall back to using UNIX modes if we get NOT_IMPLEMENTED. - */ - if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) { - result |= dos_mode_from_sbuf(fsp->conn, - &fsp->fsp_name->st, - fsp); - } + + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) { + result |= dos_mode_from_sbuf(fsp->conn, + &fsp->fsp_name->st, + fsp); } fsp->fsp_name->st.cached_dos_attributes = dos_mode_post(result, fsp, __func__);