diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-07-21 19:55:51 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:09 +0200 |
commit | d7b21954b9049d749b98b50dad14f35d44f3340f (patch) | |
tree | ebab6418b9f7e8bd3be68ed721062583b9514370 /fs/bcachefs/bkey_methods.c | |
parent | bcachefs: Don't squash return code in check_dirents() (diff) | |
download | linux-d7b21954b9049d749b98b50dad14f35d44f3340f.tar.xz linux-d7b21954b9049d749b98b50dad14f35d44f3340f.zip |
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.c | 2 |
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); } |