|
@@ -5496,8 +5496,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
|
|
|
goto out;
|
|
|
} else if (left_end_reached) {
|
|
|
if (right_level == 0) {
|
|
|
- ret = changed_cb(left_root, right_root,
|
|
|
- left_path, right_path,
|
|
|
+ ret = changed_cb(left_path, right_path,
|
|
|
&right_key,
|
|
|
BTRFS_COMPARE_TREE_DELETED,
|
|
|
ctx);
|
|
@@ -5508,8 +5507,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
|
|
|
continue;
|
|
|
} else if (right_end_reached) {
|
|
|
if (left_level == 0) {
|
|
|
- ret = changed_cb(left_root, right_root,
|
|
|
- left_path, right_path,
|
|
|
+ ret = changed_cb(left_path, right_path,
|
|
|
&left_key,
|
|
|
BTRFS_COMPARE_TREE_NEW,
|
|
|
ctx);
|
|
@@ -5523,8 +5521,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
|
|
|
if (left_level == 0 && right_level == 0) {
|
|
|
cmp = btrfs_comp_cpu_keys(&left_key, &right_key);
|
|
|
if (cmp < 0) {
|
|
|
- ret = changed_cb(left_root, right_root,
|
|
|
- left_path, right_path,
|
|
|
+ ret = changed_cb(left_path, right_path,
|
|
|
&left_key,
|
|
|
BTRFS_COMPARE_TREE_NEW,
|
|
|
ctx);
|
|
@@ -5532,8 +5529,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
|
|
|
goto out;
|
|
|
advance_left = ADVANCE;
|
|
|
} else if (cmp > 0) {
|
|
|
- ret = changed_cb(left_root, right_root,
|
|
|
- left_path, right_path,
|
|
|
+ ret = changed_cb(left_path, right_path,
|
|
|
&right_key,
|
|
|
BTRFS_COMPARE_TREE_DELETED,
|
|
|
ctx);
|
|
@@ -5550,8 +5546,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
|
|
|
result = BTRFS_COMPARE_TREE_CHANGED;
|
|
|
else
|
|
|
result = BTRFS_COMPARE_TREE_SAME;
|
|
|
- ret = changed_cb(left_root, right_root,
|
|
|
- left_path, right_path,
|
|
|
+ ret = changed_cb(left_path, right_path,
|
|
|
&left_key, result, ctx);
|
|
|
if (ret < 0)
|
|
|
goto out;
|