Commit 4b1012d5 authored by Maciej Szwed's avatar Maciej Szwed Committed by Jim Harris
Browse files

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: default avatarMaciej Szwed <maciej.szwed@intel.com>
Change-Id: I1827d783a7cd18caf831275554e33f398b0b962f

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451783


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 58c4dac9
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -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");