git.samba.org
/
kamenim
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a40b9f2
)
Check return value of tdb_delete()
author
Sumit Bose
<sbose@redhat.com>
Mon, 19 Nov 2012 10:20:31 +0000
(11:20 +0100)
committer
Amitay Isaacs
<amitay@gmail.com>
Thu, 11 Jul 2013 05:16:55 +0000
(15:16 +1000)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit
5cdcc3d45d358ddbcd7e864898eed9cbd9935429
)
ctdb/server/ctdb_recover.c
patch
|
blob
|
history
diff --git
a/ctdb/server/ctdb_recover.c
b/ctdb/server/ctdb_recover.c
index 18b4d8e58ebfa6cf0e46d23438f92472e9b4d47a..0bec03e7a547a107344cf761cb08ce5fa44715f8 100644
(file)
--- a/
ctdb/server/ctdb_recover.c
+++ b/
ctdb/server/ctdb_recover.c
@@
-824,7
+824,9
@@
static int delete_tdb_record(struct ctdb_context *ctdb, struct ctdb_db_context *
if (data.dsize < sizeof(struct ctdb_ltdb_header)) {
if (tdb_lock_nonblock(ctdb_db->ltdb->tdb, -1, F_WRLCK) == 0) {
- tdb_delete(ctdb_db->ltdb->tdb, key);
+ if (tdb_delete(ctdb_db->ltdb->tdb, key) != 0) {
+ DEBUG(DEBUG_CRIT,(__location__ " Failed to delete corrupt record\n"));
+ }
tdb_unlock(ctdb_db->ltdb->tdb, -1, F_WRLCK);
DEBUG(DEBUG_CRIT,(__location__ " Deleted corrupt record\n"));
}