Coly Li ff2695e52c bcache: put bch_bio_map() back to correct location in journal_write_unlocked()
Commit a7c50c940477 ("block: pass a block_device and opf to bio_reset")
moves bch_bio_map() inside journal_write_unlocked() next to the location
where the modified bio_reset() was called.

This change is wrong because calling bch_bio_map() immediately after
bio_reset(), a BUG_ON(!bio->bi_iter.bi_size) inside bch_bio_map() will
be triggered and panic the kernel.

This patch puts bch_bio_map() back to its original correct location in
journal_write_unlocked() and avoid the BUG_ON().

Fixes: a7c50c940477 ("block: pass a block_device and opf to bio_reset")
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220419160425.4148-2-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-04-19 11:28:17 -06:00
..
2022-03-02 12:15:54 -05:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2022-03-24 19:37:53 -07:00
2022-02-22 21:11:08 -05:00
2021-12-04 08:58:51 -08:00
2022-01-06 08:37:03 -08:00
2022-03-24 19:37:53 -07:00
2022-03-21 17:16:01 -07:00
2022-02-22 21:11:08 -05:00
2022-02-22 21:11:08 -05:00
2022-03-08 15:16:54 -08:00
2022-03-26 11:51:46 -07:00
2022-03-08 15:16:54 -08:00
2019-03-12 10:15:18 -07:00
2022-03-26 11:51:46 -07:00
2022-03-26 11:51:46 -07:00
2022-01-06 08:37:02 -08:00
2022-03-24 19:37:53 -07:00
2022-03-08 15:16:54 -08:00