summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/core.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-06-07 14:04:28 -0600
committerJens Axboe <axboe@kernel.dk>2019-06-07 14:04:28 -0600
commit6c70f899b8089ae23cdb4aa63050e3df4e20c71e (patch)
treebb86ffe39b6acce8681b31cbce98e15806967cf4 /drivers/nvme/host/core.c
parent19e9da9e86c43687ed6a56bd39a52c6649973a35 (diff)
parent62f99b62e5e3b88d23b6ced4380199e8386965af (diff)
Merge branch 'nvme-5.2-rc-next' of git://git.infradead.org/nvme into for-linusfor-linus-20190608
Pull NVMe fixes from Sagi. * 'nvme-5.2-rc-next' of git://git.infradead.org/nvme: nvme-rdma: use dynamic dma mapping per command nvme: Fix u32 overflow in the number of namespace list calculation nvmet: fix data_len to 0 for bdev-backed write_zeroes nvme-tcp: fix queue mapping when queue count is limited nvme-rdma: fix queue mapping when queue count is limited
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r--drivers/nvme/host/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1b7c2afd84cb..120fb593d1da 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3400,7 +3400,8 @@ static int nvme_scan_ns_list(struct nvme_ctrl *ctrl, unsigned nn)
{
struct nvme_ns *ns;
__le32 *ns_list;
- unsigned i, j, nsid, prev = 0, num_lists = DIV_ROUND_UP(nn, 1024);
+ unsigned i, j, nsid, prev = 0;
+ unsigned num_lists = DIV_ROUND_UP_ULL((u64)nn, 1024);
int ret = 0;
ns_list = kzalloc(NVME_IDENTIFY_DATA_SIZE, GFP_KERNEL);