Skip to content

Commit 0189a2d

Browse files
author
Miklos Szeredi
committed
fuse: use ->reconfigure() instead of ->remount_fs()
s_op->remount_fs() is only called from legacy_reconfigure(), which is not used after being converted to the new API. Convert to using ->reconfigure(). This restores the previous behavior of syncing the filesystem and rejecting MS_MANDLOCK on remount. Fixes: c30da2e ("fuse: convert to use the new mount API") Cc: <stable@vger.kernel.org> # v5.4 Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
1 parent c146024 commit 0189a2d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎fs/fuse/inode.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ static void fuse_evict_inode(struct inode *inode)
121121
}
122122
}
123123

124-
static int fuse_remount_fs(struct super_block *sb, int *flags, char *data)
124+
static int fuse_reconfigure(struct fs_context *fc)
125125
{
126+
struct super_block *sb = fc->root->d_sb;
127+
126128
sync_filesystem(sb);
127-
if (*flags & SB_MANDLOCK)
129+
if (fc->sb_flags & SB_MANDLOCK)
128130
return -EINVAL;
129131

130132
return 0;
@@ -817,7 +819,6 @@ static const struct super_operations fuse_super_operations = {
817819
.evict_inode = fuse_evict_inode,
818820
.write_inode = fuse_write_inode,
819821
.drop_inode = generic_delete_inode,
820-
.remount_fs = fuse_remount_fs,
821822
.put_super = fuse_put_super,
822823
.umount_begin = fuse_umount_begin,
823824
.statfs = fuse_statfs,
@@ -1296,6 +1297,7 @@ static int fuse_get_tree(struct fs_context *fc)
12961297
static const struct fs_context_operations fuse_context_ops = {
12971298
.free = fuse_free_fc,
12981299
.parse_param = fuse_parse_param,
1300+
.reconfigure = fuse_reconfigure,
12991301
.get_tree = fuse_get_tree,
13001302
};
13011303

0 commit comments

Comments
 (0)