On Sun, May 23, 2021 at 10:20:27AM +0200, Hannes Reinecke wrote: > What about the check for GENHD_FL_UP a bit further up in line 766? > Can this still happen with the new allocation scheme, ie is there still a > difference in lifetime between ->disk and ->disk->queue? Yes, nvme_free_ns_head can still be called before device_add_disk was called for an allocated nshead gendisk during error handling of the setup path. There is still a difference in the lifetime in that they are separately refcounted, but it does not matter to the driver.