diff options
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
-rw-r--r-- | fs/btrfs/tree-defrag.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c index a6a3956cedfb..3e8358c36165 100644 --- a/fs/btrfs/tree-defrag.c +++ b/fs/btrfs/tree-defrag.c | |||
@@ -23,10 +23,11 @@ | |||
23 | #include "transaction.h" | 23 | #include "transaction.h" |
24 | #include "locking.h" | 24 | #include "locking.h" |
25 | 25 | ||
26 | /* defrag all the leaves in a given btree. If cache_only == 1, don't read things | 26 | /* defrag all the leaves in a given btree. If cache_only == 1, don't read |
27 | * from disk, otherwise read all the leaves and try to get key order to | 27 | * things from disk, otherwise read all the leaves and try to get key order to |
28 | * better reflect disk order | 28 | * better reflect disk order |
29 | */ | 29 | */ |
30 | |||
30 | int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, | 31 | int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, |
31 | struct btrfs_root *root, int cache_only) | 32 | struct btrfs_root *root, int cache_only) |
32 | { | 33 | { |
@@ -65,9 +66,9 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, | |||
65 | level = btrfs_header_level(root->node); | 66 | level = btrfs_header_level(root->node); |
66 | orig_level = level; | 67 | orig_level = level; |
67 | 68 | ||
68 | if (level == 0) { | 69 | if (level == 0) |
69 | goto out; | 70 | goto out; |
70 | } | 71 | |
71 | if (root->defrag_progress.objectid == 0) { | 72 | if (root->defrag_progress.objectid == 0) { |
72 | struct extent_buffer *root_node; | 73 | struct extent_buffer *root_node; |
73 | u32 nritems; | 74 | u32 nritems; |