diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-08-20 07:59:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:06 -0500 |
commit | 8bab4bdc5dc73f460034d366495705c68eef5347 (patch) | |
tree | f850b92ed881324c779fe38462bb66098f392d7d /source3 | |
parent | 8fb2e83733c2593d25c5c50d60948cea6587dcc6 (diff) | |
download | samba-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')
-rw-r--r-- | source3/locking/posix.c | 5 |
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)) { |