Message ID | 20210707044037.37992-6-matthew.ruffell@canonical.com |
---|---|
State | New |
Headers | show |
Series | btrfs: Automatic balance returns -EUCLEAN and leads to forced readonly filesystem | expand |
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index aaa33186648b..ff953b345cb0 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -1855,7 +1855,7 @@ int replace_path(struct btrfs_trans_handle *trans, old_bytenr = btrfs_node_blockptr(parent, slot); blocksize = fs_info->nodesize; old_ptr_gen = btrfs_node_ptr_generation(parent, slot); - btrfs_node_key_to_cpu(parent, &key, slot); + btrfs_node_key_to_cpu(parent, &first_key, slot); if (level <= max_level) { eb = path->nodes[level];