summaryrefslogtreecommitdiff
path: root/source3/locking/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/locking/posix.c')
-rw-r--r--source3/locking/posix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 606f208673..f7d70504b1 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -640,7 +640,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)) {