Skip to content

Commit 4f285a7

Browse files
tobluxkdave
authored andcommitted
btrfs: use str_yes_no() helper function in btrfs_dump_free_space()
Remove hard-coded strings by using the str_yes_no() and str_no_yes() helper functions. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 0f71202 commit 4f285a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/btrfs/free-space-cache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/ratelimit.h>
1212
#include <linux/error-injection.h>
1313
#include <linux/sched/mm.h>
14+
#include <linux/string_choices.h>
1415
#include "ctree.h"
1516
#include "fs.h"
1617
#include "messages.h"
@@ -2935,12 +2936,11 @@ void btrfs_dump_free_space(struct btrfs_block_group *block_group,
29352936
if (info->bytes >= bytes && !block_group->ro)
29362937
count++;
29372938
btrfs_crit(fs_info, "entry offset %llu, bytes %llu, bitmap %s",
2938-
info->offset, info->bytes,
2939-
(info->bitmap) ? "yes" : "no");
2939+
info->offset, info->bytes, str_yes_no(info->bitmap));
29402940
}
29412941
spin_unlock(&ctl->tree_lock);
29422942
btrfs_info(fs_info, "block group has cluster?: %s",
2943-
list_empty(&block_group->cluster_list) ? "no" : "yes");
2943+
str_no_yes(list_empty(&block_group->cluster_list)));
29442944
btrfs_info(fs_info,
29452945
"%d free space entries at or bigger than %llu bytes",
29462946
count, bytes);

0 commit comments

Comments
 (0)