diff --git a/module/bdev/nvme/bdev_nvme.c b/module/bdev/nvme/bdev_nvme.c index ba2f424c09..8194efd3f9 100644 --- a/module/bdev/nvme/bdev_nvme.c +++ b/module/bdev/nvme/bdev_nvme.c @@ -941,7 +941,7 @@ bdev_nvme_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type) struct spdk_nvme_ctrlr *ctrlr; const struct spdk_nvme_ctrlr_data *cdata; - nvme_ns = nvme_bdev_to_bdev_ns(nbdev); + nvme_ns = nbdev->nvme_ns; assert(nvme_ns != NULL); ns = nvme_ns->ns; ctrlr = spdk_nvme_ns_get_ctrlr(ns); @@ -1179,7 +1179,7 @@ bdev_nvme_dump_info_json(void *ctx, struct spdk_json_write_ctx *w) union spdk_nvme_csts_register csts; char buf[128]; - nvme_ns = nvme_bdev_to_bdev_ns(nvme_bdev); + nvme_ns = nvme_bdev->nvme_ns; assert(nvme_ns != NULL); ns = nvme_ns->ns; ctrlr = spdk_nvme_ns_get_ctrlr(ns); diff --git a/module/bdev/nvme/common.h b/module/bdev/nvme/common.h index 1128bccf32..90e8e06df6 100644 --- a/module/bdev/nvme/common.h +++ b/module/bdev/nvme/common.h @@ -199,10 +199,4 @@ bdev_nvme_find_admin_path(struct nvme_io_channel *nvme_ch, return true; } -static inline struct nvme_bdev_ns * -nvme_bdev_to_bdev_ns(struct nvme_bdev *nbdev) -{ - return nbdev->nvme_ns; -} - #endif /* SPDK_COMMON_BDEV_NVME_H */