From d16540d3c4794010bb6ca8f4c29d68b527195d83 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 1 Feb 2004 11:10:55 +0000 Subject: 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) --- source3/tdb/tdb.c | 12 ++++++++---- 1 file 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; -- cgit