diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-01-04 08:51:19 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-04 09:05:23 -0700 |
commit | 613b14884b8595e20b9fac4126bf627313827fbe (patch) | |
tree | c779b681aaaeb9854bc310c3a618b8c72f376686 /drivers/nvme/host/multipath.c | |
parent | 1551ed5a178ca030adc92b1eb29157b5e92bf134 (diff) |
block: handle bio_split_to_limits() NULL return
This can't happen right now, but in preparation for allowing
bio_split_to_limits() returning NULL if it ended the bio, check for it
in all the callers.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/multipath.c')
-rw-r--r-- | drivers/nvme/host/multipath.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index c03093b6813c..fc39d01e7b63 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -376,6 +376,8 @@ static void nvme_ns_head_submit_bio(struct bio *bio) * pool from the original queue to allocate the bvecs from. */ bio = bio_split_to_limits(bio); + if (!bio) + return; srcu_idx = srcu_read_lock(&head->srcu); ns = nvme_find_path(head); |