summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-defrag.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
-rw-r--r--fs/btrfs/tree-defrag.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c
index 3994795edfeb..5c58630dce03 100644
--- a/fs/btrfs/tree-defrag.c
+++ b/fs/btrfs/tree-defrag.c
@@ -78,6 +78,8 @@ static int defrag_walk_down(struct btrfs_trans_handle *trans,
break;
if (*level == 1) {
+ WARN_ON(btrfs_header_generation(path->nodes[*level]) !=
+ trans->transid);
ret = btrfs_realloc_node(trans, root,
path->nodes[*level],
path->slots[*level],