Skip to content

Commit b66b449

Browse files
committed
Merge tag 'gfs2-v5.4-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 fix from Andreas Gruenbacher: "Fix remounting (broken in -rc1)." * tag 'gfs2-v5.4-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix initialisation of args for remount
2 parents 23fdb19 + d579814 commit b66b449

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

fs/gfs2/ops_fstype.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,17 +1540,23 @@ static int gfs2_init_fs_context(struct fs_context *fc)
15401540
{
15411541
struct gfs2_args *args;
15421542

1543-
args = kzalloc(sizeof(*args), GFP_KERNEL);
1543+
args = kmalloc(sizeof(*args), GFP_KERNEL);
15441544
if (args == NULL)
15451545
return -ENOMEM;
15461546

1547-
args->ar_quota = GFS2_QUOTA_DEFAULT;
1548-
args->ar_data = GFS2_DATA_DEFAULT;
1549-
args->ar_commit = 30;
1550-
args->ar_statfs_quantum = 30;
1551-
args->ar_quota_quantum = 60;
1552-
args->ar_errors = GFS2_ERRORS_DEFAULT;
1547+
if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) {
1548+
struct gfs2_sbd *sdp = fc->root->d_sb->s_fs_info;
15531549

1550+
*args = sdp->sd_args;
1551+
} else {
1552+
memset(args, 0, sizeof(*args));
1553+
args->ar_quota = GFS2_QUOTA_DEFAULT;
1554+
args->ar_data = GFS2_DATA_DEFAULT;
1555+
args->ar_commit = 30;
1556+
args->ar_statfs_quantum = 30;
1557+
args->ar_quota_quantum = 60;
1558+
args->ar_errors = GFS2_ERRORS_DEFAULT;
1559+
}
15541560
fc->fs_private = args;
15551561
fc->ops = &gfs2_context_ops;
15561562
return 0;

0 commit comments

Comments
 (0)