1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

tdb_chainunlock: ignore return value.

TDB2 returns void here.  tdb_chainunlock will *always* return with the
chain unlocked, but it will complain via the log function if it wasn't
locked.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2011-06-20 18:40:31 +09:30
parent 868d77bc5b
commit 9850f25633
3 changed files with 5 additions and 10 deletions

View File

@ -994,10 +994,7 @@ static int db_ctdb_record_destr(struct db_record* data)
hex_encode_talloc(data, (unsigned char *)data->key.dptr,
data->key.dsize)));
if (tdb_chainunlock(crec->ctdb_ctx->wtdb->tdb, data->key) != 0) {
DEBUG(0, ("tdb_chainunlock failed\n"));
return -1;
}
tdb_chainunlock(crec->ctdb_ctx->wtdb->tdb, data->key);
threshold = lp_ctdb_locktime_warn_threshold();
if (threshold != 0) {

View File

@ -43,10 +43,7 @@ static int db_tdb_record_destr(struct db_record* data)
hex_encode_talloc(data, (unsigned char *)data->key.dptr,
data->key.dsize)));
if (tdb_chainunlock(ctx->wtdb->tdb, data->key) != 0) {
DEBUG(0, ("tdb_chainunlock failed\n"));
return -1;
}
tdb_chainunlock(ctx->wtdb->tdb, data->key);
return 0;
}

View File

@ -131,8 +131,9 @@ int smb_unlock_share_mode_entry(struct smbdb_ctx *db_ctx,
uint64_t extid)
{
struct locking_key lk;
return tdb_chainunlock(db_ctx->smb_tdb,
get_locking_key(&lk, dev, ino, extid));
tdb_chainunlock(db_ctx->smb_tdb,
get_locking_key(&lk, dev, ino, extid));
return 0;
}
/*