summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-08 13:02:36 +0200
committerJens Axboe <axboe@kernel.dk>2023-06-12 08:04:04 -0600
commitd32e2bf83791727a84ad5d3e3d713e82f9adbe30 (patch)
tree6aaaf62734fcc70cbb04543bc161c56ab9e2f2b5 /drivers/md/bcache
parent444aa2c58cb3b6cfe3b7cc7db6c294d73393a894 (diff)
downloadlinux-stable-d32e2bf83791727a84ad5d3e3d713e82f9adbe30.tar.gz
linux-stable-d32e2bf83791727a84ad5d3e3d713e82f9adbe30.tar.bz2
linux-stable-d32e2bf83791727a84ad5d3e3d713e82f9adbe30.zip
block: pass a gendisk to ->open
->open is only called on the whole device. Make that explicit by passing a gendisk instead of the block_device. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: Christian Brauner <brauner@kernel.org> Acked-by: Jack Wang <jinpu.wang@ionos.com> [rnbd] Link: https://lore.kernel.org/r/20230608110258.189493-9-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index d84c09a73af8..6683f66e7011 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -732,9 +732,9 @@ out:
/* Bcache device */
-static int open_dev(struct block_device *b, fmode_t mode)
+static int open_dev(struct gendisk *disk, fmode_t mode)
{
- struct bcache_device *d = b->bd_disk->private_data;
+ struct bcache_device *d = disk->private_data;
if (test_bit(BCACHE_DEV_CLOSING, &d->flags))
return -ENXIO;