[Concept,27/33] ext4l: Move blk_holder_ops to linux/blkdev.h

Message ID 20260121220857.2137568-28-sjg@u-boot.org
State New
Headers
Series Reorganise ext4l compatibility stubs |

Commit Message

Simon Glass Jan. 21, 2026, 10:08 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move the blk_holder_ops struct definition and fs_holder_ops to
linux/blkdev.h where other block device operations reside.

This reduces ext4_uboot.h from 425 to 420 lines.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 fs/ext4l/ext4_uboot.h  | 6 ------
 include/linux/blkdev.h | 5 ++++-
 2 files changed, 4 insertions(+), 7 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 4e8c2199800..6f8c78bdeb0 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -269,12 +269,6 @@  void ext4_unregister_li_request(struct super_block *sb);
 /* I/O priority classes - use linux/ioprio.h */
 #include <linux/ioprio.h>
 
-/* blk_holder_ops for block device */
-struct blk_holder_ops {
-	void (*mark_dead)(struct block_device *, bool);
-};
-static const struct blk_holder_ops fs_holder_ops;
-
 /* end_buffer_write_sync - implemented in support.c */
 void end_buffer_write_sync(struct buffer_head *bh, int uptodate);
 
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 89d284dab26..1ee5b33da72 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -83,7 +83,10 @@  void invalidate_bdev(struct block_device *bdev);
 unsigned int bdev_max_discard_sectors(struct block_device *bdev);
 
 /* Block device file operations - implemented in ext4l/stub.c */
-struct blk_holder_ops;
+struct blk_holder_ops {
+	void (*mark_dead)(struct block_device *, bool);
+};
+static const struct blk_holder_ops fs_holder_ops;
 void bdev_fput(void *file);
 void *bdev_file_open_by_dev(dev_t dev, int flags, void *holder,
 			    const struct blk_holder_ops *ops);