Rev 665: errno is only valid if a system call has failed. This bug
caused in http://samba.org/~tridge/3_0-ctdb
tridge at samba.org
tridge at samba.org
Tue Nov 13 09:42:10 GMT 2007
------------------------------------------------------------
revno: 665
revision-id:tridge at samba.org-20071113094002-dxu4kevdi4g91miu
parent: tridge at samba.org-20071112105544-pjg096dj7spsm8zr
committer: Andrew Tridgell <tridge at samba.org>
branch nick: s3-ctdb-tridge
timestamp: Tue 2007-11-13 20:40:02 +1100
message:
errno is only valid if a system call has failed. This bug caused
SMBclose to occasionally return NT_STATUS_ACCESS_DENIED for no reason
in BENCH-NBENCH
Need to check if upstream Samba 3.2 is affected by this.
modified:
source/locking/posix.c posix.c-20070210173807-1wjifrbwaz6xnmgl-637
=== modified file 'source/locking/posix.c'
--- a/source/locking/posix.c 2007-05-21 10:59:16 +0000
+++ b/source/locking/posix.c 2007-11-13 09:40:02 +0000
@@ -641,7 +641,10 @@
*/
ret = SMB_VFS_CLOSE(fsp,fsp->fh->fd);
fsp->fh->fd = -1;
- return map_nt_error_from_unix(errno);
+ if (ret != 0) {
+ return map_nt_error_from_unix(errno);
+ }
+ return NT_STATUS_OK;
}
if (get_windows_lock_ref_count(fsp)) {
More information about the samba-cvs
mailing list