Btrfs-progs: fsck: fix wrong index in pick_next_pending()
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Tue, 18 Mar 2014 12:02:47 +0000 (20:02 +0800)
committerDavid Sterba <dsterba@suse.cz>
Fri, 11 Apr 2014 17:05:40 +0000 (19:05 +0200)
Though all tree blocks have same size, we'd better use right
index here.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-check.c

index 39a0869..288906f 100644 (file)
@@ -2920,7 +2920,7 @@ static int pick_next_pending(struct cache_tree *pending,
        cache = search_cache_extent(reada, 0);
        if (cache) {
                bits[0].start = cache->start;
-               bits[1].size = cache->size;
+               bits[0].size = cache->size;
                *reada_bits = 1;
                return 1;
        }