OSDN Git Service

btrfs: make find_free_dev_extent() static
authorFilipe Manana <fdmanana@suse.com>
Wed, 26 Jul 2023 15:57:08 +0000 (16:57 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:52:18 +0000 (14:52 +0200)
The function find_free_dev_extent() is only used within volumes.c, so make
it static and remove its prototype from volumes.h.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h

index 89410a4..72d8a3b 100644 (file)
@@ -1726,8 +1726,8 @@ out:
        return ret;
 }
 
-int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes,
-                        u64 *start, u64 *len)
+static int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes,
+                               u64 *start, u64 *len)
 {
        /* FIXME use last free of some kind */
        return find_free_dev_extent_start(device, num_bytes, 0, start, len);
index b8c51f1..a59898d 100644 (file)
@@ -650,8 +650,6 @@ int btrfs_cancel_balance(struct btrfs_fs_info *fs_info);
 int btrfs_create_uuid_tree(struct btrfs_fs_info *fs_info);
 int btrfs_uuid_scan_kthread(void *data);
 bool btrfs_chunk_writeable(struct btrfs_fs_info *fs_info, u64 chunk_offset);
-int find_free_dev_extent(struct btrfs_device *device, u64 num_bytes,
-                        u64 *start, u64 *max_avail);
 void btrfs_dev_stat_inc_and_print(struct btrfs_device *dev, int index);
 int btrfs_get_dev_stats(struct btrfs_fs_info *fs_info,
                        struct btrfs_ioctl_get_dev_stats *stats);