]> git.hungrycats.org Git - linux/commitdiff
btrfs: fix warning on uninit variable in btrfs_finish_chunk_alloc
authorChris Mason <clm@fb.com>
Wed, 23 Dec 2015 21:30:51 +0000 (13:30 -0800)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sun, 27 Dec 2015 05:08:05 +0000 (00:08 -0500)
map->num_stripes really can't be zero, but just in case.

Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit 140e639f1a3ff052c3921818e2120fdfa4427681)

fs/btrfs/volumes.c

index 6186348668dc8da0045821cb090191f4680c6394..8d1d50f3a955f2f4ddb3babf5e57eeef013cf7fd 100644 (file)
@@ -4670,7 +4670,7 @@ int btrfs_finish_chunk_alloc(struct btrfs_trans_handle *trans,
        u64 dev_offset;
        u64 stripe_size;
        int i = 0;
-       int ret;
+       int ret = 0;
 
        em_tree = &extent_root->fs_info->mapping_tree.map_tree;
        read_lock(&em_tree->lock);