tdb_chainunlock: ignore return value.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 8 Jun 2011 08:00:41 +0000 (17:30 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 8 Jun 2011 08:00:41 +0000 (17:30 +0930)
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>
source3/lib/dbwrap_ctdb.c
source3/lib/dbwrap_tdb.c
source3/libsmb/smb_share_modes.c

index 3a3e36c7c426081688ed4d88669b13617d4e4338..d93157502dd22084d91c036191a469865ae8e5a2 100644 (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) {
index fa70dc2194f2d435b92a22465c20ffe296c0c1f3..e1133ac22bd3622225a67ddfd1c151b19fde33b6 100644 (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;
 }
 
index 86e1a81ef121e54b0fb45db22556e93ce0918823..a4a54972c90ade3fbfa524886e815eed4dee7687 100644 (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;
 }
 
 /*