Skip to content

Commit 07cf8ba

Browse files
Hongbo LiKent Overstreet
authored andcommitted
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: 9305cf9 ("bcachefs: bch2_opts_to_text()") Signed-off-by: Hongbo Li <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
1 parent 97535cd commit 07cf8ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/bcachefs/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2038,7 +2038,7 @@ static int bch2_show_options(struct seq_file *seq, struct dentry *root)
20382038
bch2_opts_to_text(&buf, c->opts, c, c->disk_sb.sb,
20392039
OPT_MOUNT, OPT_HIDDEN, OPT_SHOW_MOUNT_STYLE);
20402040
printbuf_nul_terminate(&buf);
2041-
seq_puts(seq, buf.buf);
2041+
seq_printf(seq, ",%s", buf.buf);
20422042

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

0 commit comments

Comments
 (0)