summaryrefslogtreecommitdiff
path: root/source3/locking/posix.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-08-20 07:59:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:06 -0500
commit8bab4bdc5dc73f460034d366495705c68eef5347 (patch)
treef850b92ed881324c779fe38462bb66098f392d7d /source3/locking/posix.c
parent8fb2e83733c2593d25c5c50d60948cea6587dcc6 (diff)
downloadsamba-8bab4bdc5dc73f460034d366495705c68eef5347.tar.gz
samba-8bab4bdc5dc73f460034d366495705c68eef5347.tar.bz2
samba-8bab4bdc5dc73f460034d366495705c68eef5347.zip
r24571: Only look at errno if the close call actually failed
Patch from Ofir Azoulay <Ofir.Azoulay@expand.com> -- thanks (This used to be commit 888e657d758173c0eb4b68059d6fb5ae45b2b2ed)
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)) {