git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
527adf2
)
Check return value of tdb_delete()
author
Sumit Bose
<sbose@redhat.com>
Mon, 19 Nov 2012 10:20:31 +0000
(11:20 +0100)
committer
Michael Adam
<obnox@samba.org>
Wed, 14 Aug 2013 19:53:19 +0000
(21:53 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
5cdcc3d45d358ddbcd7e864898eed9cbd9935429
)
server/ctdb_recover.c
patch
|
blob
|
history
diff --git
a/server/ctdb_recover.c
b/server/ctdb_recover.c
index 9d360c7634f4cabeddc92112d59d0bd8be6ee2e0..9e839fdfd5d0bf66cd06a273a0e8625de50a137f 100644
(file)
--- a/
server/ctdb_recover.c
+++ b/
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"));
}