]> git.hungrycats.org Git - linux/commitdiff
zygo: fixup btrfs: do not resolve backrefs for roots that are being deleted
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Tue, 1 Sep 2020 04:49:02 +0000 (00:49 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Tue, 1 Sep 2020 05:34:02 +0000 (01:34 -0400)
(cherry picked from commit 2e219d3245d453c3fb8d9ae990b5725bfc7daf40)

fs/btrfs/backref.c

index a1bd7e63d29dcf822e06d695e6367f853b0b6f71..7546d7d8bf2d95ed62fe3128a4eb30cffc7e7e7c 100644 (file)
@@ -562,6 +562,7 @@ static int resolve_indirect_ref(struct btrfs_fs_info *fs_info,
 
        if (!path->search_commit_root &&
            test_bit(BTRFS_ROOT_DELETING, &root->state)) {
+               srcu_read_unlock(&fs_info->subvol_srcu, index);
                ret = -ENOENT;
                goto out;
        }