Btrfs: cleanup for btrfs_btree_balance_dirty
[linux-2.6-block.git] / fs / btrfs / transaction.c
index f21f39f0b1a1ccfdb42772752e078bf376ef4f58..7b297354e7383a6fa5d73dd46d4cc702c4343cbf 100644 (file)
@@ -952,7 +952,6 @@ int btrfs_defrag_root(struct btrfs_root *root, int cacheonly)
        struct btrfs_fs_info *info = root->fs_info;
        struct btrfs_trans_handle *trans;
        int ret;
-       unsigned long nr;
 
        if (xchg(&root->defrag_running, 1))
                return 0;
@@ -964,9 +963,8 @@ int btrfs_defrag_root(struct btrfs_root *root, int cacheonly)
 
                ret = btrfs_defrag_leaves(trans, root, cacheonly);
 
-               nr = trans->blocks_used;
                btrfs_end_transaction(trans, root);
-               btrfs_btree_balance_dirty(info->tree_root, nr);
+               btrfs_btree_balance_dirty(info->tree_root);
                cond_resched();
 
                if (btrfs_fs_closing(root->fs_info) || ret != -EAGAIN)