r10494: - don't generate a tdb log message for any type of failed lock probe
authorAndrew Tridgell <tridge@samba.org>
Mon, 26 Sep 2005 01:37:46 +0000 (01:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:38:55 +0000 (13:38 -0500)
- if the lock upgrade loop ever fails then log a warning
(This used to be commit 1b03c4e6c7e89452a835ef5ff39c07f58b715a22)

source4/lib/tdb/common/lock.c

index 04135a22748e31d0943a89f534a8d59b4b3bb2da..750d34ea3123ede376c18f19913877f6244c0290 100644 (file)
@@ -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;
 }