Skip to content
Snippets Groups Projects
Commit b42473cd authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Jens Axboe
Browse files

md: check for failure when adding pages in alloc_behind_master_bio


alloc_behind_master_bio() can possibly add multiple pages to a bio, but it
is not checking for the return value of bio_add_page() if adding really
succeeded.

Check if the page adding succeeded and if not bail out.

Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarSong Liu <song@kernel.org>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/827aa12d44ebf3f50b41b47f5cedc0f80179f2c1.1685532726.git.johannes.thumshirn@wdc.com


[axboe: fold in s/free_page/put_page fix]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5225229b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment