summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2012-11-14 14:34:34 +0000
committerJosef Bacik <jbacik@fusionio.com>2012-12-12 17:15:28 -0500
commitb53d3f5db2b79637acadc06a330db6c2c60863f5 (patch)
treef5ad7a1612f413e1ae459eb88d20642972d6b02c /fs/btrfs/transaction.c
parent3ef5969cd8a42a78ccdbc53f7abb2e6136b2ec65 (diff)
downloadlinux-b53d3f5db2b79637acadc06a330db6c2c60863f5.tar.bz2
Btrfs: cleanup for btrfs_btree_balance_dirty
- 'nr' is no more used. - btrfs_btree_balance_dirty() and __btrfs_btree_balance_dirty() can share a bunch of code. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index f21f39f0b1a1..7b297354e738 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -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)