@@ -2138,7 +2138,7 @@ static struct file_system_type btrfs_fs_type = {
.name = "btrfs",
.mount = btrfs_mount,
.kill_sb = btrfs_kill_super,
- .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | FS_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA,
};
static struct file_system_type btrfs_root_fs_type = {
@@ -2146,7 +2146,7 @@ static struct file_system_type btrfs_root_fs_type = {
.name = "btrfs",
.mount = btrfs_mount_root,
.kill_sb = btrfs_kill_super,
- .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | FS_ALLOW_IDMAP | FS_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | FS_ALLOW_IDMAP,
};
MODULE_ALIAS_FS("btrfs");
@@ -1104,7 +1104,7 @@ struct file_system_type cifs_fs_type = {
.init_fs_context = smb3_init_fs_context,
.parameters = smb3_fs_parameters,
.kill_sb = cifs_kill_sb,
- .fs_flags = FS_RENAME_DOES_D_MOVE | FS_AUTOFREEZE,
+ .fs_flags = FS_RENAME_DOES_D_MOVE,
};
MODULE_ALIAS_FS("cifs");
@@ -1114,7 +1114,7 @@ struct file_system_type smb3_fs_type = {
.init_fs_context = smb3_init_fs_context,
.parameters = smb3_fs_parameters,
.kill_sb = cifs_kill_sb,
- .fs_flags = FS_RENAME_DOES_D_MOVE | FS_AUTOFREEZE,
+ .fs_flags = FS_RENAME_DOES_D_MOVE,
};
MODULE_ALIAS_FS("smb3");
MODULE_ALIAS("smb3");
@@ -637,7 +637,7 @@ static struct file_system_type ecryptfs_fs_type = {
.name = "ecryptfs",
.mount = ecryptfs_mount,
.kill_sb = ecryptfs_kill_block_super,
- .fs_flags = 0| FS_AUTOFREEZE
+ .fs_flags = 0
};
MODULE_ALIAS_FS("ecryptfs");
@@ -136,7 +136,7 @@ static struct file_system_type ext2_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV | FS_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV,
};
MODULE_ALIAS_FS("ext2");
MODULE_ALIAS("ext2");
@@ -152,7 +152,7 @@ static struct file_system_type ext3_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV | FS_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV,
};
MODULE_ALIAS_FS("ext3");
MODULE_ALIAS("ext3");
@@ -7189,7 +7189,7 @@ static struct file_system_type ext4_fs_type = {
.init_fs_context = ext4_init_fs_context,
.parameters = ext4_param_specs,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
};
MODULE_ALIAS_FS("ext4");
@@ -4645,7 +4645,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_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
};
MODULE_ALIAS_FS("f2fs");
@@ -1740,7 +1740,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_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV,
.init_fs_context = gfs2_init_fs_context,
.parameters = gfs2_fs_parameters,
.kill_sb = gfs2_kill_sb,
@@ -1750,7 +1750,7 @@ MODULE_ALIAS_FS("gfs2");
struct file_system_type gfs2meta_fs_type = {
.name = "gfs2meta",
- .fs_flags = FS_REQUIRES_DEV | FS_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV,
.init_fs_context = gfs2_meta_init_fs_context,
.owner = THIS_MODULE,
};
@@ -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_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV,
};
MODULE_ALIAS_FS("jfs");
@@ -1583,7 +1583,7 @@ struct file_system_type nfs_fs_type = {
.init_fs_context = nfs_init_fs_context,
.parameters = nfs_fs_parameters,
.kill_sb = nfs_kill_super,
- .fs_flags = FS_RENAME_DOES_D_MOVE|FS_BINARY_MOUNTDATA | FS_AUTOFREEZE,
+ .fs_flags = FS_RENAME_DOES_D_MOVE|FS_BINARY_MOUNTDATA,
};
MODULE_ALIAS_FS("nfs");
EXPORT_SYMBOL_GPL(nfs_fs_type);
@@ -1595,7 +1595,7 @@ struct file_system_type nfs4_fs_type = {
.init_fs_context = nfs_init_fs_context,
.parameters = nfs_fs_parameters,
.kill_sb = nfs_kill_super,
- .fs_flags = FS_RENAME_DOES_D_MOVE|FS_BINARY_MOUNTDATA | FS_AUTOFREEZE,
+ .fs_flags = FS_RENAME_DOES_D_MOVE|FS_BINARY_MOUNTDATA,
};
MODULE_ALIAS_FS("nfs4");
MODULE_ALIAS("nfs4");
@@ -1857,8 +1857,6 @@ EXPORT_SYMBOL(thaw_super);
#ifdef CONFIG_PM_SLEEP
static bool super_should_freeze(struct super_block *sb)
{
- if (!(sb->s_type->fs_flags & FS_AUTOFREEZE))
- return false;
/*
* We don't freeze virtual filesystems, we skip those filesystems with
* no backing device.
@@ -1966,7 +1966,7 @@ static struct file_system_type xfs_fs_type = {
.init_fs_context = xfs_init_fs_context,
.parameters = xfs_fs_parameters,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP | FS_AUTOFREEZE,
+ .fs_flags = FS_REQUIRES_DEV | FS_ALLOW_IDMAP,
};
MODULE_ALIAS_FS("xfs");
@@ -2231,7 +2231,6 @@ 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_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
-#define FS_AUTOFREEZE (1<<16) /* temporary as we phase kthread freezer out */
int (*init_fs_context)(struct fs_context *);
const struct fs_parameter_spec *parameters;
struct dentry *(*mount) (struct file_system_type *, int,
Now that all filesystems have been converted over to stop using the kthread freezer APIs we can remove FS_AUTOFREEZE and its check. The following Coccinelle rule was used as to remove the flag: spatch --sp-file remove-fs-autofreezeflag.cocci --in-place --timeout 120 --dir fs/ --jobs 12 --use-gitgrep @ rm_auto_flag @ expression E1; identifier fs_type; @@ struct file_system_type fs_type = { .fs_flags = E1 - | FS_AUTOFREEZE , }; Generated-by: Coccinelle SmPL Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> --- fs/btrfs/super.c | 4 ++-- fs/cifs/cifsfs.c | 4 ++-- fs/ecryptfs/main.c | 2 +- fs/ext4/super.c | 6 +++--- fs/f2fs/super.c | 2 +- fs/gfs2/ops_fstype.c | 4 ++-- fs/jfs/super.c | 2 +- fs/nfs/fs_context.c | 4 ++-- fs/super.c | 2 -- fs/xfs/xfs_super.c | 2 +- include/linux/fs.h | 1 - 11 files changed, 15 insertions(+), 18 deletions(-)