summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-04-19 02:59:51 +0200
committerMichael Adam <obnox@samba.org>2014-06-17 09:33:10 +0200
commit385e2236fbc2a4dca97c3b2f83c592f99abaee25 (patch)
treecb4a908af61c5eee2c7960d6c5067ffca22cd8bd
parente0a11369cf85b111e0966f2677315345ddaaac76 (diff)
downloadsamba-385e2236fbc2a4dca97c3b2f83c592f99abaee25.zip
samba-385e2236fbc2a4dca97c3b2f83c592f99abaee25.tar.gz
samba-385e2236fbc2a4dca97c3b2f83c592f99abaee25.tar.xz
ctdb:vacuum: untangle assignmend and check for return of tdb_repack()
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rw-r--r--ctdb/server/ctdb_vacuum.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c
index 942d611..64cb135 100644
--- a/ctdb/server/ctdb_vacuum.c
+++ b/ctdb/server/ctdb_vacuum.c
@@ -1307,6 +1307,7 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db,
const char *name = ctdb_db->db_name;
int freelist_size = 0;
struct vacuum_data *vdata;
+ int ret;
vdata = talloc_zero(mem_ctx, struct vacuum_data);
if (vdata == NULL) {
@@ -1354,7 +1355,8 @@ static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db,
DEBUG(DEBUG_INFO, ("Repacking %s with %u freelist entries\n",
name, freelist_size));
- if (tdb_repack(ctdb_db->ltdb->tdb) != 0) {
+ ret = tdb_repack(ctdb_db->ltdb->tdb);
+ if (ret != 0) {
DEBUG(DEBUG_ERR,(__location__ " Failed to repack '%s'\n", name));
talloc_free(vdata);
return -1;