diff options
author | Tim Potter <tpot@samba.org> | 2004-02-01 11:10:55 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2004-02-01 11:10:55 +0000 |
commit | d16540d3c4794010bb6ca8f4c29d68b527195d83 (patch) | |
tree | ec14b28fa778482720fe17a184356344e47e35c8 /source3 | |
parent | e827764d0a6a39f587a7d3143e22b3887112b41e (diff) | |
download | samba-d16540d3c4794010bb6ca8f4c29d68b527195d83.tar.gz samba-d16540d3c4794010bb6ca8f4c29d68b527195d83.tar.bz2 samba-d16540d3c4794010bb6ca8f4c29d68b527195d83.zip |
Merge from 3.0:
>Don't log an error if a tdb_brlock() returns EAGAIN - it's supposed to
>do that.
(This used to be commit d8182b8bf54dc00378caa82e8c325891a08b17ca)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/tdb/tdb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index ff70750385..7ad39175ac 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -242,10 +242,14 @@ static int tdb_brlock(TDB_CONTEXT *tdb, tdb_off offset, tdb->fd, offset, rw_type, lck_type)); return TDB_ERRCODE(TDB_ERR_LOCK_TIMEOUT, -1); } - /* Otherwise - generic lock error. */ - /* errno set by fcntl */ - TDB_LOG((tdb, 5, "tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d: %s\n", - tdb->fd, offset, rw_type, lck_type, strerror(errno))); + /* Otherwise - generic lock error. errno set by fcntl. + * EAGAIN is an expected return from non-blocking + * locks. */ + if (errno != EAGAIN) { + TDB_LOG((tdb, 5, "tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d: %s\n", + tdb->fd, offset, rw_type, lck_type, + strerror(errno))); + } return TDB_ERRCODE(TDB_ERR_LOCK, -1); } return 0; |