bdev/null: free Null bdev names on shutdown

Use the existing bdev_null_destruct() function instead of open-coding
the bdev cleanup; the bdev_null_finish() path neglected to free the bdev
name.

Change-Id: Ie74be39b0475674f70c3999bbe2f21caab2e2e20
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389867
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-11-30 09:28:45 -07:00 committed by Jim Harris
parent c0cf813e11
commit 47dc18d2d3

View File

@ -267,8 +267,7 @@ bdev_null_finish(void)
struct null_bdev *bdev, *tmp;
TAILQ_FOREACH_SAFE(bdev, &g_null_bdev_head, tailq, tmp) {
TAILQ_REMOVE(&g_null_bdev_head, bdev, tailq);
spdk_dma_free(bdev);
bdev_null_destruct(bdev);
}
}