summaryrefslogtreecommitdiff
path: root/source/locking/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/locking/posix.c')
-rw-r--r--source/locking/posix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/locking/posix.c b/source/locking/posix.c
index 62804eb8e34..dc54a341941 100644
--- a/source/locking/posix.c
+++ b/source/locking/posix.c
@@ -651,7 +651,10 @@ NTSTATUS fd_close_posix(struct connection_struct *conn, files_struct *fsp)
*/
ret = SMB_VFS_CLOSE(fsp,fsp->fh->fd);
fsp->fh->fd = -1;
- return map_nt_error_from_unix(errno);
+ if (ret == -1) {
+ return map_nt_error_from_unix(errno);
+ }
+ return NT_STATUS_OK;
}
if (get_windows_lock_ref_count(fsp)) {