Commit 07cf8bac authored by Hongbo Li's avatar Hongbo Li Committed by Kent Overstreet
Browse files

bcachefs: fix incorrect show_options results



When call show_options in bcachefs, the options buffer is appeneded
to the seq variable. In fact, it requires an additional comma to be
appended first. This will affect the remount process when reading
existing mount options.

Fixes: 9305cf91d05e ("bcachefs: bch2_opts_to_text()")
Signed-off-by: default avatarHongbo Li <lihongbo22@huawei.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 97535cd8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2038,7 +2038,7 @@ static int bch2_show_options(struct seq_file *seq, struct dentry *root)
	bch2_opts_to_text(&buf, c->opts, c, c->disk_sb.sb,
			  OPT_MOUNT, OPT_HIDDEN, OPT_SHOW_MOUNT_STYLE);
	printbuf_nul_terminate(&buf);
	seq_puts(seq, buf.buf);
	seq_printf(seq, ",%s", buf.buf);

	int ret = buf.allocation_failure ? -ENOMEM : 0;
	printbuf_exit(&buf);