summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-01-04 16:51:19 +0100
committerJens Axboe <axboe@kernel.dk>2023-01-04 17:05:23 +0100
commit613b14884b8595e20b9fac4126bf627313827fbe (patch)
treec779b681aaaeb9854bc310c3a618b8c72f376686 /drivers/md/dm.c
parentMerge tag 'nvme-6.2-2022-12-29' of git://git.infradead.org/nvme into block-6.2 (diff)
downloadlinux-613b14884b8595e20b9fac4126bf627313827fbe.tar.xz
linux-613b14884b8595e20b9fac4126bf627313827fbe.zip
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/md/dm.c')
-rw-r--r--drivers/md/dm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index e1ea3a7bd9d9..b424a6ee27ba 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1742,6 +1742,8 @@ static void dm_split_and_process_bio(struct mapped_device *md,
* otherwise associated queue_limits won't be imposed.
*/
bio = bio_split_to_limits(bio);
+ if (!bio)
+ return;
}
init_clone_info(&ci, md, map, bio, is_abnormal);