From 4b1012d5bf79703de909277167dee6007d14cd93 Mon Sep 17 00:00:00 2001 From: Maciej Szwed Date: Tue, 23 Apr 2019 19:57:44 +0200 Subject: [PATCH] blobstore: change _spdk_bs_blob_list_remove() type to void _spdk_bs_blob_list_remove function returns only 0 so it can be changed to void function. Signed-off-by: Maciej Szwed Change-Id: I1827d783a7cd18caf831275554e33f398b0b962f Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451783 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/blob/blobstore.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 0d7a925da..ccab4e3fa 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -2374,7 +2374,7 @@ _spdk_bs_blob_list_add(struct spdk_blob *blob) return 0; } -static int +static void _spdk_bs_blob_list_remove(struct spdk_blob *blob) { struct spdk_blob_list *snapshot_entry = NULL; @@ -2383,7 +2383,7 @@ _spdk_bs_blob_list_remove(struct spdk_blob *blob) _spdk_blob_get_snapshot_and_clone_entries(blob, &snapshot_entry, &clone_entry); if (snapshot_entry == NULL) { - return 0; + return; } blob->parent_id = SPDK_BLOBID_INVALID; @@ -2391,8 +2391,6 @@ _spdk_bs_blob_list_remove(struct spdk_blob *blob) free(clone_entry); snapshot_entry->clone_count--; - - return 0; } static int @@ -5085,12 +5083,7 @@ _spdk_bs_delete_open_cpl(void *cb_arg, struct spdk_blob *blob, int bserrno) } } - bserrno = _spdk_bs_blob_list_remove(blob); - if (bserrno != 0) { - SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Remove blob #%" PRIu64 " from a list\n", blob->id); - spdk_bs_sequence_finish(seq, bserrno); - return; - } + _spdk_bs_blob_list_remove(blob); if (blob->locked_operation_in_progress) { SPDK_DEBUGLOG(SPDK_LOG_BLOB, "Cannot remove blob - another operation in progress\n");