Btrfs: Allocator fix variety pack
[linux-2.6-block.git] / fs / btrfs / ctree.c
index 02e571e6ee620efacb5529a67d262f81759ab153..1d404bde3cfa13fa70d1f474e136d4c8695091b7 100644 (file)
@@ -363,7 +363,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
                        other = btrfs_node_blockptr(parent, i - 1);
                        close = close_blocks(blocknr, other, blocksize);
                }
-               if (close && i < end_slot - 2) {
+               if (!close && i < end_slot - 2) {
                        other = btrfs_node_blockptr(parent, i + 1);
                        close = close_blocks(blocknr, other, blocksize);
                }