Message ID | 20230918110510.66470-19-hare@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: update buffer_head for Large-block I/O | expand |
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index f3a01b79148c..e72f1b1ee27a 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1889,7 +1889,7 @@ static void nvme_update_disk_info(struct gendisk *disk, * The block layer can't support LBA sizes larger than the page size * yet, so catch this early and don't allow block I/O. */ - if (ns->lba_shift > PAGE_SHIFT) { + if ((ns->lba_shift > PAGE_SHIFT) && IS_ENABLED(CONFIG_BUFFER_HEAD)) { capacity = 0; bs = (1 << 9); }