diff mbox series

[RFC,29/34] bdev: make struct bdev_handle private to the block layer

Message ID 20240103-vfs-bdev-file-v1-29-6c8ee55fb6ef@kernel.org (mailing list archive)
State New
Headers show
Series Open block devices as files & a bd_inode proposal | expand

Commit Message

Christian Brauner Jan. 3, 2024, 12:55 p.m. UTC
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 block/bdev.c           | 1 -
 block/blk.h            | 6 ++++++
 include/linux/blkdev.h | 6 ------
 include/linux/fs.h     | 6 ------
 4 files changed, 6 insertions(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/block/bdev.c b/block/bdev.c
index 80caa71a65db..b276ef994858 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -49,7 +49,6 @@  struct block_device *I_BDEV(struct inode *inode)
 }
 EXPORT_SYMBOL(I_BDEV);
 
-/* @bdev_handle will become private to block/blk.h soon. */
 struct block_device *F_BDEV(struct file *f_bdev)
 {
 	struct bdev_handle *handle = f_bdev->private_data;
diff --git a/block/blk.h b/block/blk.h
index 3ec5e9b5c26c..d1a2030fa5c3 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -25,6 +25,12 @@  struct blk_flush_queue {
 	struct request		*flush_rq;
 };
 
+struct bdev_handle {
+	struct block_device *bdev;
+	void *holder;
+	blk_mode_t mode;
+};
+
 bool is_flush_rq(struct request *req);
 
 struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2d06f02f6d5e..5599a33e78a6 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1498,12 +1498,6 @@  extern const struct blk_holder_ops fs_holder_ops;
 	(BLK_OPEN_READ | BLK_OPEN_RESTRICT_WRITES | \
 	 (((flags) & SB_RDONLY) ? 0 : BLK_OPEN_WRITE))
 
-struct bdev_handle {
-	struct block_device *bdev;
-	void *holder;
-	blk_mode_t mode;
-};
-
 struct file *bdev_file_open_by_dev(dev_t dev, blk_mode_t mode, void *holder,
 		const struct blk_holder_ops *hops);
 struct file *bdev_file_open_by_path(const char *path, blk_mode_t mode,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b0a5e94e8c3a..b23d49f7adfe 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1326,12 +1326,6 @@  struct super_block {
 	struct list_head	s_inodes_wb;	/* writeback inodes */
 } __randomize_layout;
 
-/* Temporary helper that will go away. */
-static inline struct bdev_handle *sb_bdev_handle(struct super_block *sb)
-{
-	return sb->s_f_bdev->private_data;
-}
-
 static inline struct user_namespace *i_user_ns(const struct inode *inode)
 {
 	return inode->i_sb->s_user_ns;