1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

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)
This commit is contained in:
Volker Lendecke 2007-08-20 07:59:22 +00:00 committed by Gerald (Jerry) Carter
parent 8fb2e83733
commit 8bab4bdc5d

View File

@ -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)) {