[Concept,19/23] ext4l: Move BLK_OPEN_* flags to linux/blkdev.h

Message ID 20260119061529.3383191-20-sjg@u-boot.org
State New
Headers
Series Reduce ext4_uboot.h by moving definitions to linux headers |

Commit Message

Simon Glass Jan. 19, 2026, 6:15 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move the block device open flags to include/linux/blkdev.h where they
belong with other block device definitions, matching Linux kernel
organisation.

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 | 7 +++++++
 2 files changed, 8 insertions(+), 5 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 9e3d59a3174..dc6d4c3910a 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -1194,11 +1194,7 @@  void ext4_unregister_li_request(struct super_block *sb);
 #define SB_I_CGROUPWB			0	/* Not supported in U-Boot */
 #define SB_I_ALLOW_HSM			0	/* Not supported in U-Boot */
 
-/* Block open flags */
-#define BLK_OPEN_READ			(1 << 0)
-#define BLK_OPEN_WRITE			(1 << 1)
-#define BLK_OPEN_RESTRICT_WRITES	(1 << 2)
-
+/* BLK_OPEN_* flags are in linux/blkdev.h */
 /* REQ_OP_*, REQ_SYNC, REQ_FUA are in linux/blk_types.h */
 
 /* blk_holder_ops for block device */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 8c848139a7e..f1a4cc12d3c 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -18,6 +18,13 @@  struct gendisk;
 /* Block size helpers */
 #define bdev_logical_block_size(bdev)	512
 
+/* Block device open flags */
+#define BLK_OPEN_READ			(1 << 0)
+#define BLK_OPEN_WRITE			(1 << 1)
+#define BLK_OPEN_EXCL			(1 << 2)
+#define BLK_OPEN_NDELAY			(1 << 3)
+#define BLK_OPEN_RESTRICT_WRITES	(1 << 4)
+
 /**
  * struct blk_plug - block I/O plug
  *