]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fs, block: move blk_mode_t and fop_flags_t into <linux/types.h>
authorChristian Brauner <brauner@kernel.org>
Tue, 16 Jun 2026 14:08:20 +0000 (16:08 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 29 Jun 2026 08:31:51 +0000 (10:31 +0200)
blk_mode_t and fop_flags_t are both plain 'unsigned int __bitwise' flag
typedefs, exactly like the gfp_t, slab_flags_t and fmode_t that already
live in <linux/types.h>. Move them there so they are available
everywhere without having to drag in a subsystem header.

Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260616-work-super-bdev_holder_global-v2-4-7df6b864028e@kernel.org
Tested-by: syzbot@syzkaller.appspotmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
include/linux/blkdev.h
include/linux/fs.h
include/linux/types.h

index f4e5eca5a91ff08e9572a9c0f5ba83b646397b00..9e395d95067e5f638c1a22fa68530aaeaa7e1cca 100644 (file)
@@ -126,8 +126,6 @@ struct blk_integrity {
        unsigned char                           pi_tuple_size;
 };
 
-typedef unsigned int __bitwise blk_mode_t;
-
 /* open for reading */
 #define BLK_OPEN_READ          ((__force blk_mode_t)(1 << 0))
 /* open for writing */
index d10897b3a1e35017d0286a822106f5fd4b0d7edd..33d7dffda7524b65ae5b61cb2f4bd465826d4bc4 100644 (file)
@@ -1916,8 +1916,6 @@ struct dir_context {
 struct io_uring_cmd;
 struct offset_ctx;
 
-typedef unsigned int __bitwise fop_flags_t;
-
 struct file_operations {
        struct module *owner;
        fop_flags_t fop_flags;
index 93166b0b0617ad4ab951b7d7e20d3e35727121ec..bc5dda2a3d8618efc33182c88664b3e2aaed1a35 100644 (file)
@@ -163,6 +163,8 @@ typedef u32 dma_addr_t;
 typedef unsigned int __bitwise gfp_t;
 typedef unsigned int __bitwise slab_flags_t;
 typedef unsigned int __bitwise fmode_t;
+typedef unsigned int __bitwise blk_mode_t;
+typedef unsigned int __bitwise fop_flags_t;
 
 #ifdef CONFIG_PHYS_ADDR_T_64BIT
 typedef u64 phys_addr_t;