WSL2-Linux-Kernel/drivers/md/bcache
Coly Li 9dca4168a3 bcache: fix wrong bdev parameter when calling bio_alloc_clone() in do_bio_hook()
Commit abfc426d1b ("block: pass a block_device to bio_clone_fast")
calls the modified bio_alloc_clone() in bcache code as:
	bio_init_clone(bio->bi_bdev, bio, orig_bio, GFP_NOIO);

But the first parameter is wrong, where bio->bi_bdev should be
orig_bio->bi_bdev. The wrong bi_bdev panics the kernel when submitting
cache bio.

This patch fixes the wrong bdev parameter usage and avoid the panic.

Fixes: abfc426d1b ("block: pass a block_device to bio_clone_fast")
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Mike Snitzer <snitzer@redhat.com>
Link: https://lore.kernel.org/r/20220419160425.4148-3-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-04-19 11:28:17 -06:00
..
Kconfig
Makefile
alloc.c
bcache.h
bcache_ondisk.h
bset.c
bset.h
btree.c
btree.h
closure.c
closure.h
debug.c
debug.h
extents.c
extents.h
features.c
features.h
io.c
journal.c
journal.h
movinggc.c
request.c bcache: fix wrong bdev parameter when calling bio_alloc_clone() in do_bio_hook() 2022-04-19 11:28:17 -06:00
request.h
stats.c
stats.h
super.c
sysfs.c
sysfs.h
trace.c
util.c
util.h
writeback.c
writeback.h