diff options
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r-- | fs/bcachefs/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index d998e51dbc30..9f3eafb3e0d4 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -134,6 +134,7 @@ void bch2_flags_to_text(struct printbuf *out, const char * const list[], u64 flags) { unsigned bit, nr = 0; + bool first = true; if (out->pos != out->end) *out->pos = '\0'; @@ -142,7 +143,10 @@ void bch2_flags_to_text(struct printbuf *out, nr++; while (flags && (bit = __ffs(flags)) < nr) { - pr_buf(out, "%s,", list[bit]); + pr_buf(out, "%s", list[bit]); + if (!first) + pr_buf(out, ","); + first = false; flags ^= 1 << bit; } } |