[PATCH V5 2/2] nvme: allow open for nvme-generic char device
Christoph Hellwig
hch at lst.de
Wed Feb 24 11:45:23 EST 2021
On Mon, Feb 22, 2021 at 08:01:07PM +0100, javier at javigon.com wrote:
> @@ -1885,7 +1885,7 @@ static int nvme_ns_open(struct nvme_ns *ns)
> {
> #ifdef CONFIG_NVME_MULTIPATH
> /* should never be called due to GENHD_FL_HIDDEN */
> - if (WARN_ON_ONCE(ns->head->disk))
> + if (WARN_ON_ONCE(!nvme_ns_is_generic(ns) && ns->head->disk))
> goto fail;
Maybe just move the check into the block device caller instead?
More information about the Linux-nvme
mailing list