mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
Don't log an error in tdb_brlock() if a non-blocking lock returns EAGAIN -
it's supposed to do that.
This commit is contained in:
parent
87343fc15a
commit
2423a45947
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user