Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bcache: don't pass a stack address to blkdev_get_by_path

sb is just an on-stack pointer that can easily be reused by other calls.
Switch to use the bcache-wide bcache_kobj instead as there is no need to
claim per-bcache device anyway.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20230608110258.189493-13-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
29499ab0 c889d079

+1 -1
+1 -1
drivers/md/bcache/super.c
··· 2560 2560 err = "failed to open device"; 2561 2561 bdev = blkdev_get_by_path(strim(path), 2562 2562 FMODE_READ|FMODE_WRITE|FMODE_EXCL, 2563 - sb, NULL); 2563 + bcache_kobj, NULL); 2564 2564 if (IS_ERR(bdev)) { 2565 2565 if (bdev == ERR_PTR(-EBUSY)) { 2566 2566 dev_t dev;