diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-09-26 04:00:01 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-10-18 06:49:48 +0200 |
commit | 07cf8bac2d3efa8d3fb62cd4d98c00087efd7fe8 (patch) | |
tree | ebe59f02b17575fdf7d526d9c55d9299aec06302 /fs/bcachefs | |
parent | bcachefs: Fix data corruption on -ENOSPC in buffered write path (diff) | |
download | linux-07cf8bac2d3efa8d3fb62cd4d98c00087efd7fe8.tar.xz linux-07cf8bac2d3efa8d3fb62cd4d98c00087efd7fe8.zip |
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: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 506b9a2b5bd7..0ea443eeb8cd 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -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); |