linux/drivers/nvme/host
Guixin Liu bafd590910 nvme: introduce nvme_disk_is_ns_head helper
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().

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Liu Song <liusong@linux.alibaba.com>
[include fix: https://lore.kernel.org/oe-kbuild-all/202401031943.0N72Tkji-lkp@intel.com/]
Signed-off-by: Keith Busch <kbusch@kernel.org>
2024-01-05 13:15:41 -08:00
..
apple.c nvme-apple: return directly instead of else 2023-04-13 08:55:06 +02:00
auth.c nvme-auth: set explanation code for failure2 msgs 2023-11-20 09:25:23 -08:00
constants.c nvme fixes for Linux 6.5 2023-06-30 14:04:08 -06:00
core.c nvme: simplify the max_discard_segments calculation 2024-01-03 08:09:40 -08:00
fabrics.c nvme: blank out authentication fabrics options if not configured 2023-11-20 09:25:32 -08:00
fabrics.h nvme-fabrics: parse options 'keyring' and 'tls_key' 2023-10-11 10:29:58 -07:00
fault_inject.c nvme: fix parameter check in nvme_fault_inject_init() 2023-07-12 08:48:33 -07:00
fc.c nvme-fc: set numa_node after nvme_init_ctrl 2023-12-21 09:19:01 -08:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme: host: hwmon: constify pointers to hwmon_channel_info 2023-08-21 12:54:02 -07:00
ioctl.c nvme: move ns id info to struct nvme_ns_head 2023-12-19 09:09:15 -08:00
Kconfig nvme: common: make keyring and auth separate modules 2023-11-07 10:05:15 -08:00
Makefile nvme: rework NVME_AUTH Kconfig selection 2023-10-12 08:04:49 -07:00
multipath.c nvme: rename ns attribute group 2023-12-19 09:10:05 -08:00
nvme.h nvme: introduce nvme_disk_is_ns_head helper 2024-01-05 13:15:41 -08:00
pci.c nvme-pci: disable write zeroes for SK Hynix BC901 2024-01-05 13:15:41 -08:00
pr.c nvme: introduce nvme_disk_is_ns_head helper 2024-01-05 13:15:41 -08:00
rdma.c nvme: refactor ns info helpers 2023-12-19 09:09:58 -08:00
sysfs.c nvme: introduce nvme_disk_is_ns_head helper 2024-01-05 13:15:41 -08:00
tcp.c nvme: tcp: remove unnecessary goto statement 2024-01-03 08:09:39 -08:00
trace.c nvme: implement In-Band authentication 2022-08-02 17:14:49 -06:00
trace.h nvme: fix async event trace event 2023-04-13 08:59:04 +02:00
zns.c nvme udpates for Linux 6.8 2023-12-21 14:44:17 -07:00