]> git.hungrycats.org Git - linux/commitdiff
btrfs: cleanup: remove no-used alloc_chunk in btrfs_check_data_free_space()
authorZhao Lei <zhaolei@cn.fujitsu.com>
Mon, 9 Feb 2015 06:40:20 +0000 (14:40 +0800)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Wed, 22 Apr 2015 16:23:45 +0000 (12:23 -0400)
int alloc_chunk is never used in this function, remove it.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
(cherry picked from commit b9fd47cde5dd9725ca37769861b7424f40828492)

fs/btrfs/extent-tree.c

index 2547a1625ec33af0313de1949a70f6f2e84665c3..02feaf0f499caec2d7e92aadc70db4555f3cf5b6 100644 (file)
@@ -3641,7 +3641,7 @@ int btrfs_check_data_free_space(struct inode *inode, u64 bytes)
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct btrfs_fs_info *fs_info = root->fs_info;
        u64 used;
-       int ret = 0, committed = 0, alloc_chunk = 1;
+       int ret = 0, committed = 0;
 
        /* make sure bytes are sectorsize aligned */
        bytes = ALIGN(bytes, root->sectorsize);
@@ -3669,7 +3669,7 @@ again:
                 * if we don't have enough free bytes in this space then we need
                 * to alloc a new chunk.
                 */
-               if (!data_sinfo->full && alloc_chunk) {
+               if (!data_sinfo->full) {
                        u64 alloc_target;
 
                        data_sinfo->force_alloc = CHUNK_ALLOC_FORCE;