summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-02-01 10:55:54 +0000
committerTim Potter <tpot@samba.org>2004-02-01 10:55:54 +0000
commit6d69dd9ae223d4793add7f959ef60e4533df7c14 (patch)
tree17b649caa27b2d36269f09a157b27fea5df2af28 /source3/tdb
parent575bc995c0d6d1381c02deebc1c45c0fd644f1c2 (diff)
downloadsamba-6d69dd9ae223d4793add7f959ef60e4533df7c14.tar.gz
samba-6d69dd9ae223d4793add7f959ef60e4533df7c14.tar.bz2
samba-6d69dd9ae223d4793add7f959ef60e4533df7c14.zip
Don't log an error in tdb_brlock() if a non-blocking lock returns EAGAIN -
it's supposed to do that. (This used to be commit 2423a459471136d701b498ff0db797c70c6d0fce)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.c12
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;