@@ -464,7 +464,7 @@ static struct file_system_type adfs_fs_type = {
.name = "adfs",
.mount = adfs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("adfs");
@@ -649,7 +649,7 @@ static struct file_system_type affs_fs_type = {
.name = "affs",
.mount = affs_mount,
.kill_sb = affs_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("affs");
@@ -982,7 +982,7 @@ static struct file_system_type befs_fs_type = {
.name = "befs",
.mount = befs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("befs");
@@ -459,7 +459,7 @@ static struct file_system_type bfs_fs_type = {
.name = "bfs",
.mount = bfs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("bfs");
@@ -40,7 +40,7 @@ static struct file_system_type efs_fs_type = {
.name = "efs",
.mount = efs_mount,
.kill_sb = efs_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("efs");
@@ -786,7 +786,7 @@ static struct file_system_type exfat_fs_type = {
.init_fs_context = exfat_init_fs_context,
.parameters = exfat_parameters,
.kill_sb = exfat_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
static void exfat_inode_init_once(void *foo)
@@ -1629,7 +1629,7 @@ static struct file_system_type ext2_fs_type = {
.name = "ext2",
.mount = ext2_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("ext2");
@@ -137,7 +137,7 @@ static struct file_system_type ext2_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = ext4_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("ext2");
MODULE_ALIAS("ext2");
@@ -153,7 +153,7 @@ static struct file_system_type ext3_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = ext4_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("ext3");
MODULE_ALIAS("ext3");
@@ -7314,7 +7314,8 @@ static struct file_system_type ext4_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = ext4_kill_sb,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_MGTIME,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_MGTIME |
+ FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("ext4");
@@ -4903,7 +4903,7 @@ static struct file_system_type f2fs_fs_type = {
.name = "f2fs",
.mount = f2fs_mount,
.kill_sb = kill_f2fs_super,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("f2fs");
@@ -667,7 +667,7 @@ static struct file_system_type msdos_fs_type = {
.name = "msdos",
.mount = msdos_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("msdos");
@@ -1212,7 +1212,7 @@ static struct file_system_type vfat_fs_type = {
.name = "vfat",
.mount = vfat_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("vfat");
@@ -293,7 +293,7 @@ static struct file_system_type vxfs_fs_type = {
.name = "vxfs",
.mount = vxfs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("vxfs"); /* makes mount -t vxfs autoload the module */
MODULE_ALIAS("vxfs");
@@ -1810,7 +1810,7 @@ static void gfs2_kill_sb(struct super_block *sb)
struct file_system_type gfs2_fs_type = {
.name = "gfs2",
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
.init_fs_context = gfs2_init_fs_context,
.parameters = gfs2_fs_parameters,
.kill_sb = gfs2_kill_sb,
@@ -1820,7 +1820,7 @@ MODULE_ALIAS_FS("gfs2");
struct file_system_type gfs2meta_fs_type = {
.name = "gfs2meta",
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
.init_fs_context = gfs2_meta_init_fs_context,
.owner = THIS_MODULE,
};
@@ -461,7 +461,7 @@ static struct file_system_type hfs_fs_type = {
.name = "hfs",
.mount = hfs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("hfs");
@@ -646,7 +646,7 @@ static struct file_system_type hfsplus_fs_type = {
.name = "hfsplus",
.mount = hfsplus_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("hfsplus");
@@ -1564,7 +1564,7 @@ static struct file_system_type iso9660_fs_type = {
.name = "iso9660",
.mount = isofs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("iso9660");
MODULE_ALIAS("iso9660");
@@ -906,7 +906,7 @@ static struct file_system_type jfs_fs_type = {
.name = "jfs",
.mount = jfs_do_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("jfs");
@@ -689,7 +689,7 @@ static struct file_system_type minix_fs_type = {
.name = "minix",
.mount = minix_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("minix");
@@ -1371,7 +1371,7 @@ struct file_system_type nilfs_fs_type = {
.name = "nilfs2",
.mount = nilfs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("nilfs2");
@@ -3062,7 +3062,7 @@ static struct file_system_type ntfs_fs_type = {
.name = "ntfs",
.mount = ntfs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("ntfs");
@@ -1738,7 +1738,7 @@ static struct file_system_type ntfs_fs_type = {
.init_fs_context = ntfs_init_fs_context,
.parameters = ntfs_fs_parameters,
.kill_sb = ntfs3_kill_sb,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_BUFFER_HEADS,
};
// clang-format on
@@ -1191,7 +1191,7 @@ static struct file_system_type ocfs2_fs_type = {
.name = "ocfs2",
.mount = ocfs2_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV|FS_RENAME_DOES_D_MOVE,
+ .fs_flags = FS_REQUIRES_DEV|FS_RENAME_DOES_D_MOVE | FS_BUFFER_HEADS,
.next = NULL
};
MODULE_ALIAS_FS("ocfs2");
@@ -607,7 +607,7 @@ static struct file_system_type omfs_fs_type = {
.name = "omfs",
.mount = omfs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("omfs");
@@ -389,7 +389,7 @@ static struct file_system_type qnx4_fs_type = {
.name = "qnx4",
.mount = qnx4_mount,
.kill_sb = qnx4_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("qnx4");
@@ -645,7 +645,7 @@ static struct file_system_type qnx6_fs_type = {
.name = "qnx6",
.mount = qnx6_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("qnx6");
@@ -2635,7 +2635,7 @@ struct file_system_type reiserfs_fs_type = {
.name = "reiserfs",
.mount = get_super_block,
.kill_sb = reiserfs_kill_sb,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("reiserfs");
@@ -545,7 +545,7 @@ static struct file_system_type sysv_fs_type = {
.name = "sysv",
.mount = sysv_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("sysv");
@@ -554,7 +554,7 @@ static struct file_system_type v7_fs_type = {
.name = "v7",
.mount = v7_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("v7");
MODULE_ALIAS("v7");
@@ -130,7 +130,7 @@ static struct file_system_type udf_fstype = {
.name = "udf",
.mount = udf_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("udf");
@@ -1513,7 +1513,7 @@ static struct file_system_type ufs_fs_type = {
.name = "ufs",
.mount = ufs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV | FS_BUFFER_HEADS,
};
MODULE_ALIAS_FS("ufs");
@@ -2336,6 +2336,7 @@ struct file_system_type {
#define FS_DISALLOW_NOTIFY_PERM 16 /* Disable fanotify permission events */
#define FS_ALLOW_IDMAP 32 /* FS has been updated to handle vfs idmappings. */
#define FS_MGTIME 64 /* FS uses multigrain timestamps */
+#define FS_BUFFER_HEADS 128 /* filesystem requires buffer-heads */
#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
int (*init_fs_context)(struct fs_context *);
const struct fs_parameter_spec *parameters;
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- fs/adfs/super.c | 2 +- fs/affs/super.c | 2 +- fs/befs/linuxvfs.c | 2 +- fs/bfs/inode.c | 2 +- fs/efs/super.c | 2 +- fs/exfat/super.c | 2 +- fs/ext2/super.c | 2 +- fs/ext4/super.c | 7 ++++--- fs/f2fs/super.c | 2 +- fs/fat/namei_msdos.c | 2 +- fs/fat/namei_vfat.c | 2 +- fs/freevxfs/vxfs_super.c | 2 +- fs/gfs2/ops_fstype.c | 4 ++-- fs/hfs/super.c | 2 +- fs/hfsplus/super.c | 2 +- fs/isofs/inode.c | 2 +- fs/jfs/super.c | 2 +- fs/minix/inode.c | 2 +- fs/nilfs2/super.c | 2 +- fs/ntfs/super.c | 2 +- fs/ntfs3/super.c | 2 +- fs/ocfs2/super.c | 2 +- fs/omfs/inode.c | 2 +- fs/qnx4/inode.c | 2 +- fs/qnx6/inode.c | 2 +- fs/reiserfs/super.c | 2 +- fs/sysv/super.c | 4 ++-- fs/udf/super.c | 2 +- fs/ufs/super.c | 2 +- include/linux/fs.h | 1 + 30 files changed, 35 insertions(+), 33 deletions(-)