diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 6621ed72f3c3f2b9ed09dcd8132482b39fbcb695..71b2d1c7da69948b932e31fa804d6b8c95d64db9 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2581,8 +2581,10 @@ static noinline int check_delayed_ref(struct btrfs_trans_handle *trans, node = rb_prev(node); if (node) { + int seq = ref->seq; + ref = rb_entry(node, struct btrfs_delayed_ref_node, rb_node); - if (ref->bytenr == bytenr) + if (ref->bytenr == bytenr && ref->seq == seq) goto out_unlock; }