From: Ralph Boehme Date: Mon, 9 Sep 2019 06:03:53 +0000 (+0200) Subject: s3:vfs: streamline vfs_stat_fsp() X-Git-Tag: talloc-2.3.1~932 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e00e78cfeda99bd5374eff8fb4ba84873e4e46b7;p=thirdparty%2Fsamba.git s3:vfs: streamline vfs_stat_fsp() BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index c50ee55469d..c08c7302a24 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1420,13 +1420,11 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp) } else { ret = SMB_VFS_STAT(fsp->conn, fsp->fsp_name); } - if (ret == -1) { - return map_nt_error_from_unix(errno); - } } else { - if(SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st) != 0) { - return map_nt_error_from_unix(errno); - } + ret = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st); + } + if (ret == -1) { + return map_nt_error_from_unix(errno); } return NT_STATUS_OK; }