summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bkey_methods.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-07-21 13:55:51 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:09 -0400
commitd7b21954b9049d749b98b50dad14f35d44f3340f (patch)
treeebab6418b9f7e8bd3be68ed721062583b9514370 /fs/bcachefs/bkey_methods.c
parent382005442674a327e7238d6dc8c16071bfc723f3 (diff)
bcachefs: Pretty-ify bch2_bkey_val_to_text()
Don't print out the ": " when there isn't a value to print. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/bkey_methods.c')
-rw-r--r--fs/bcachefs/bkey_methods.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/bkey_methods.c b/fs/bcachefs/bkey_methods.c
index 1ad6a9d30bb5..465be5fee7d9 100644
--- a/fs/bcachefs/bkey_methods.c
+++ b/fs/bcachefs/bkey_methods.c
@@ -269,7 +269,7 @@ void bch2_bkey_val_to_text(struct printbuf *out, struct bch_fs *c,
{
bch2_bkey_to_text(out, k.k);
- if (k.k) {
+ if (bkey_val_bytes(k.k)) {
pr_buf(out, ": ");
bch2_val_to_text(out, c, k);
}