Commit 8e217858 authored by Geliang Tang's avatar Geliang Tang Committed by David Sterba

btrfs: fix iterator with update error in backref.c

Fix the following error:

fs/btrfs/backref.c:565:1-20: iterator with update on line 577

Fixes: a7ca4225('btrfs: use list_for_each_entry* in backref.c')
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 95617d69
......@@ -560,13 +560,13 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info,
*/
static void __merge_refs(struct list_head *head, int mode)
{
struct __prelim_ref *ref1;
struct __prelim_ref *pos1;
list_for_each_entry(ref1, head, list) {
struct __prelim_ref *ref2 = ref1, *tmp;
list_for_each_entry(pos1, head, list) {
struct __prelim_ref *pos2 = pos1, *tmp;
list_for_each_entry_safe_continue(ref2, tmp, head, list) {
struct __prelim_ref *xchg;
list_for_each_entry_safe_continue(pos2, tmp, head, list) {
struct __prelim_ref *xchg, *ref1 = pos1, *ref2 = pos2;
struct extent_inode_elem *eie;
if (!ref_for_same_block(ref1, ref2))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment