[PATCH V3] nvme: introduce nvme_disk_is_ns_head helper
Keith Busch
kbusch at kernel.org
Tue Jan 2 13:05:13 PST 2024
On Wed, Dec 27, 2023 at 05:31:06PM +0800, Guixin Liu wrote:
> We currently rely on gendisk's file operations (fops) to distinguish
> between a namespace head (ns_head) and a regular namespace. To enhance
> code readability, introduce a helper function.
> Additionally, we must ensure that the device is not an ns_head before
> calling nvme_get_ns_from_dev(). To enforce this, add a WARN_ON check
> within the nvme_get_ns_from_dev().
Thanks, applied to nvme-6.8 with Christoph's suggestion folded in.
More information about the Linux-nvme
mailing list