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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
---
 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 --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;

-- 
2.42.0





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux