summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-04-11 16:53:36 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2024-05-03 08:36:50 +0200
commite33aef2c58577f51ec22736843a652576ce0ef7a (patch)
treea8d669103c1136907222b90e7f9b4ac6468af36a /block
parentMerge branch 'misc.erofs' into work.bdev (diff)
downloadlinux-e33aef2c58577f51ec22736843a652576ce0ef7a.tar.xz
linux-e33aef2c58577f51ec22736843a652576ce0ef7a.zip
block_device: add a pointer to struct address_space (page cache of bdev)
points to ->i_data of coallocated inode. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Link: https://lore.kernel.org/r/20240411145346.2516848-1-viro@zeniv.linux.org.uk Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'block')
-rw-r--r--block/bdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/bdev.c b/block/bdev.c
index 28e6f0423857..8e19101cbbb0 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -419,6 +419,7 @@ struct block_device *bdev_alloc(struct gendisk *disk, u8 partno)
mutex_init(&bdev->bd_holder_lock);
bdev->bd_partno = partno;
bdev->bd_inode = inode;
+ bdev->bd_mapping = &inode->i_data;
bdev->bd_queue = disk->queue;
if (partno)
bdev->bd_has_submit_bio = disk->part0->bd_has_submit_bio;