btrfs: rename btrfs_get_block_group_info and make it static
authorSu Yue <suy.fnst@cn.fujitsu.com>
Mon, 2 Apr 2018 09:24:11 +0000 (17:24 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 11:12:11 +0000 (13:12 +0200)
The function btrfs_get_block_group_info() was introduced by the
commit 5af3e8cce8b7 ("Btrfs: make filesystem read-only when submitting
 barrier fails") which used it in disk-io.c.

However, the function is only called in ioctl.c now.
Its parameter type btrfs_ioctl_space_info* is only for ioctl.

So, make it static and rename it to be original name
get_block_group_info.

No functional change.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/ioctl.c

index 0d422c9908b8085f531a752a4bd6d5bf1b430e02..15e34172cdf0a81eeaf0edf41d291d2042714fac 100644 (file)
@@ -3267,8 +3267,6 @@ int btrfs_is_empty_uuid(u8 *uuid);
 int btrfs_defrag_file(struct inode *inode, struct file *file,
                      struct btrfs_ioctl_defrag_range_args *range,
                      u64 newer_than, unsigned long max_pages);
-void btrfs_get_block_group_info(struct list_head *groups_list,
-                               struct btrfs_ioctl_space_info *space);
 void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
                               struct btrfs_ioctl_balance_args *bargs);
 ssize_t btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen,
index 632e26d6f7ce0cd26284b0e39c140c7f09a1f3d2..61a58214681c4c47e43dbd3290a9fa4b6891c5f9 100644 (file)
@@ -4007,8 +4007,8 @@ out:
        return ret;
 }
 
-void btrfs_get_block_group_info(struct list_head *groups_list,
-                               struct btrfs_ioctl_space_info *space)
+static void get_block_group_info(struct list_head *groups_list,
+                                struct btrfs_ioctl_space_info *space)
 {
        struct btrfs_block_group_cache *block_group;
 
@@ -4124,8 +4124,8 @@ static long btrfs_ioctl_space_info(struct btrfs_fs_info *fs_info,
                down_read(&info->groups_sem);
                for (c = 0; c < BTRFS_NR_RAID_TYPES; c++) {
                        if (!list_empty(&info->block_groups[c])) {
-                               btrfs_get_block_group_info(
-                                       &info->block_groups[c], &space);
+                               get_block_group_info(&info->block_groups[c],
+                                                    &space);
                                memcpy(dest, &space, sizeof(space));
                                dest++;
                                space_args.total_spaces++;