On 21-02-24 17:45:23, Christoph Hellwig wrote: > On Mon, Feb 22, 2021 at 08:01:07PM +0100, javier@xxxxxxxxxxx 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? Sure, then check for nvme_ns_is_generic(ns) will be not neccessary. Let me move this check to nvme_open() with only checking if it's head or not.