diff options
| author | Johannes Thumshirn <[email protected]> | 2023-05-31 11:50:36 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2023-06-01 15:13:13 +0000 |
| commit | b42473cdbab7661535516ae76e0a871d98b5cb97 (patch) | |
| tree | 40a82f9dff9e71f4a5b653a7ec629cfdb6f04bc5 /fs/btrfs/dev-replace.c | |
| parent | floppy: use __bio_add_page for adding single page to bio (diff) | |
| download | kernel-b42473cdbab7661535516ae76e0a871d98b5cb97.tar.gz kernel-b42473cdbab7661535516ae76e0a871d98b5cb97.zip | |
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: Christoph Hellwig <[email protected]>
Acked-by: Song Liu <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Signed-off-by: Johannes Thumshirn <[email protected]>
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: Jens Axboe <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
