From d61cf64d0e10fe5f292d72429bdf72d8cb90ea70 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 14 Mar 2018 23:01:04 +0000 Subject: [PATCH] Don't make the namespace devices eternal. We'll need to delete namespaces soon, so go ahead and stop making these devices eternal. It doesn't help much, and will be getting in the way soon. Sponsored by: Netflix --- sys/dev/nvme/nvme_ns.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/sys/dev/nvme/nvme_ns.c b/sys/dev/nvme/nvme_ns.c index 465d3c014554..6774223e6bf3 100644 --- a/sys/dev/nvme/nvme_ns.c +++ b/sys/dev/nvme/nvme_ns.c @@ -577,21 +577,9 @@ nvme_ns_construct(struct nvme_namespace *ns, uint32_t id, */ unit = device_get_unit(ctrlr->dev) * NVME_MAX_NAMESPACES + ns->id - 1; -/* - * MAKEDEV_ETERNAL was added in r210923, for cdevs that will never - * be destroyed. This avoids refcounting on the cdev object. - * That should be OK case here, as long as we're not supporting PCIe - * surprise removal nor namespace deletion. - */ -#ifdef MAKEDEV_ETERNAL_KLD - ns->cdev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &nvme_ns_cdevsw, unit, - NULL, UID_ROOT, GID_WHEEL, 0600, "nvme%dns%d", - device_get_unit(ctrlr->dev), ns->id); -#else ns->cdev = make_dev_credf(0, &nvme_ns_cdevsw, unit, NULL, UID_ROOT, GID_WHEEL, 0600, "nvme%dns%d", device_get_unit(ctrlr->dev), ns->id); -#endif #ifdef NVME_UNMAPPED_BIO_SUPPORT ns->cdev->si_flags |= SI_UNMAPPED; #endif