From 10de5cc72dcaf0607f080ee7f744f65fb680f3db Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 26 Sep 2005 01:37:46 +0000 Subject: r10494: - don't generate a tdb log message for any type of failed lock probe - if the lock upgrade loop ever fails then log a warning (This used to be commit 1b03c4e6c7e89452a835ef5ff39c07f58b715a22) --- source4/lib/tdb/common/lock.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'source4') diff --git a/source4/lib/tdb/common/lock.c b/source4/lib/tdb/common/lock.c index 04135a2274..750d34ea31 100644 --- a/source4/lib/tdb/common/lock.c +++ b/source4/lib/tdb/common/lock.c @@ -65,11 +65,7 @@ int tdb_brlock_len(struct tdb_context *tdb, tdb_off_t offset, /* 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 len=%d: %s\n", - tdb->fd, offset, rw_type, lck_type, len, - strerror(errno))); - } else if (!probe && lck_type != F_SETLK) { + if (!probe && lck_type != F_SETLK) { /* Ensure error code is set for log fun to examine. */ tdb->ecode = TDB_ERR_LOCK; TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n", @@ -103,6 +99,7 @@ int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len) tv.tv_usec = 1; select(0, NULL, NULL, NULL, &tv); } + TDB_LOG((tdb, 5,"tdb_brlock_upgrade failed at offset %d\n", offset)); return -1; } -- cgit