diff mbox series

[05/14] nvme: remove the NVME_NS_DEAD check in nvme_validate_ns

Message ID 20221101150050.3510-6-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/14] block: set the disk capacity to 0 in blk_mark_disk_dead | expand

Commit Message

Christoph Hellwig Nov. 1, 2022, 3 p.m. UTC
At the point where namespaces are marked dead, the controller is in a
non-live state and we won't get pass the identify commands.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/nvme/host/core.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Chaitanya Kulkarni Nov. 2, 2022, 1:21 a.m. UTC | #1
On 11/1/22 08:00, Christoph Hellwig wrote:
> At the point where namespaces are marked dead, the controller is in a
> non-live state and we won't get pass the identify commands.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
diff mbox series

Patch

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 390f2a2db3238..871a8ab7ec199 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4333,10 +4333,6 @@  static void nvme_validate_ns(struct nvme_ns *ns, struct nvme_ns_info *info)
 {
 	int ret = NVME_SC_INVALID_NS | NVME_SC_DNR;
 
-	if (test_bit(NVME_NS_DEAD, &ns->flags))
-		goto out;
-
-	ret = NVME_SC_INVALID_NS | NVME_SC_DNR;
 	if (!nvme_ns_ids_equal(&ns->head->ids, &info->ids)) {
 		dev_err(ns->ctrl->device,
 			"identifiers changed for nsid %d\n", ns->head->ns_id);