diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-28 12:12:02 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-10-07 07:56:18 +0200 |
commit | 310b30e575b1e2b9a569c3582062b79c5a562fb7 (patch) | |
tree | 2e9bf718a015169f99566ae4337efee0fa284c16 /drivers/nvme | |
parent | 13f0b26bbf0a8660d23cad22ed0c4b58b5675dc4 (diff) | |
download | linux-310b30e575b1e2b9a569c3582062b79c5a562fb7.tar.bz2 |
nvme: remove the 0 lba_shift check in nvme_update_ns_info
We can no longer reach this code if Identify Namespace failed.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 0114fe47de35..910198c3e0bb 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2129,13 +2129,7 @@ static int nvme_update_ns_info(struct nvme_ns *ns, struct nvme_id_ns *id) int ret; blk_mq_freeze_queue(ns->disk->queue); - /* - * If identify namespace failed, use default 512 byte block size so - * block layer can use before failing read/write for 0 capacity. - */ ns->lba_shift = id->lbaf[lbaf].ds; - if (ns->lba_shift == 0) - ns->lba_shift = 9; switch (ns->head->ids.csi) { case NVME_CSI_NVM: |