diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-01-04 16:51:19 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-04 17:05:23 +0100 |
commit | 613b14884b8595e20b9fac4126bf627313827fbe (patch) | |
tree | c779b681aaaeb9854bc310c3a618b8c72f376686 /drivers/md/dm.c | |
parent | Merge tag 'nvme-6.2-2022-12-29' of git://git.infradead.org/nvme into block-6.2 (diff) | |
download | linux-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.c | 2 |
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); |