aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig2020-03-27 09:07:17 +0100
committerJens Axboe2020-03-27 09:50:05 -0600
commit348e114bbd4dce430eae70f01a04c8fc259b4cf1 (patch)
tree01e4cd9990bbae209fd2cde121070990acd20a77 /block
parentc6a564ffadc9105880329710164ee493f0de103c (diff)
block: move the ->devnode callback to struct block_device_operations
There really isn't any good reason to stash a method directly into struct gendisk. Move it together with the other block device operations. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 6323cc789efa..14cf395a1479 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1497,8 +1497,8 @@ static char *block_devnode(struct device *dev, umode_t *mode,
{
struct gendisk *disk = dev_to_disk(dev);
- if (disk->devnode)
- return disk->devnode(disk, mode);
+ if (disk->fops->devnode)
+ return disk->fops->devnode(disk, mode);
return NULL;
}