Commit 4f285a77 authored by Thorsten Blum's avatar Thorsten Blum Committed by David Sterba
Browse files

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: default avatarThorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0f712026
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/ratelimit.h>
#include <linux/error-injection.h>
#include <linux/sched/mm.h>
#include <linux/string_choices.h>
#include "ctree.h"
#include "fs.h"
#include "messages.h"
@@ -2935,12 +2936,11 @@ void btrfs_dump_free_space(struct btrfs_block_group *block_group,
		if (info->bytes >= bytes && !block_group->ro)
			count++;
		btrfs_crit(fs_info, "entry offset %llu, bytes %llu, bitmap %s",
			   info->offset, info->bytes,
		       (info->bitmap) ? "yes" : "no");
			   info->offset, info->bytes, str_yes_no(info->bitmap));
	}
	spin_unlock(&ctl->tree_lock);
	btrfs_info(fs_info, "block group has cluster?: %s",
	       list_empty(&block_group->cluster_list) ? "no" : "yes");
	       str_no_yes(list_empty(&block_group->cluster_list)));
	btrfs_info(fs_info,
		   "%d free space entries at or bigger than %llu bytes",
		   count, bytes);