nvme: factor out a nvme_ns_is_readonly helper
authorChristoph Hellwig <hch@lst.de>
Wed, 13 Jul 2022 05:40:25 +0000 (07:40 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 26 Jul 2022 20:04:26 +0000 (16:04 -0400)
commite9fb2123bf3737366c468d92ba1df6b357cf1f55
tree684a4b38ff1872baaadbbb8acb982b362f1d0bc0
parent3576061342af24e2d96d2607be383141fbdc632c
nvme: factor out a nvme_ns_is_readonly helper

Add a little helper to check if a namespace should be marked read-only
that uses a new is_readonly flag in the nvme_ns_info structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Javier González <javier.gonz@samsung.com>
Reviewed-by: Joel Granados <j.granados@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
drivers/nvme/host/core.c