summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/vfs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 51a4aeb0f22..67f7d6356a2 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1413,13 +1413,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;
}