From e00e78cfeda99bd5374eff8fb4ba84873e4e46b7 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 9 Sep 2019 08:03:53 +0200 Subject: [PATCH] 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 --- source3/smbd/vfs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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; } -- 2.47.3