From: Amitay Isaacs Date: Wed, 14 Feb 2018 04:23:07 +0000 (+1100) Subject: ctdb-vacuum: Remove unnecessary check for zero records in delete list X-Git-Tag: samba-4.8.8~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=604c7b87e054a9870a12c1d804eec332b6c7b5ad;p=thirdparty%2Fsamba.git ctdb-vacuum: Remove unnecessary check for zero records in delete list Since no records are deleted from RB tree during step 1, there is no need for the check. Run step 2 unconditionally. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13641 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke (cherry picked from commit e15cdc652d76b37c58cd114215f00500991bc6b4) --- diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index 8faf803efb9..2194b7f4da7 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -854,10 +854,6 @@ static void ctdb_process_delete_list(struct ctdb_db_context *ctdb_db, } } - if (vdata->count.delete_list.left == 0) { - goto success; - } - /* * Step 2: * Delete the remaining records locally. @@ -873,8 +869,6 @@ static void ctdb_process_delete_list(struct ctdb_db_context *ctdb_db, "delete list for deletion.\n")); } -success: - if (vdata->count.delete_list.left != 0) { DEBUG(DEBUG_ERR, (__location__ " Vaccum db[%s] error: " "there are %u records left for deletion after "