The block layer already validates proper block sizes with blk_validate_block_size() for us so we can remove this now superfluous check. Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> --- drivers/nvme/host/core.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 855b42c92284..86ff872cf6bd 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2022,16 +2022,6 @@ static bool nvme_update_disk_info(struct nvme_ns *ns, struct nvme_id_ns *id, u32 atomic_bs, phys_bs, io_opt = 0; bool valid = true; - /* - * The block layer can't support LBA sizes larger than the page size - * or smaller than a sector size yet, so catch this early and don't - * allow block I/O. - */ - if (head->lba_shift > PAGE_SHIFT || head->lba_shift < SECTOR_SHIFT) { - bs = (1 << 9); - valid = false; - } - atomic_bs = phys_bs = bs; if (id->nabo == 0) { /* -- 2.43.0