]> 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:27:46 +0000 (01:27 -0400)
(cherry picked from commit 2e219d3245d453c3fb8d9ae990b5725bfc7daf40)

fs/btrfs/backref.c

index c942775aa096932f8445d00b8a431925d8e24cfe..ace3b91ad5c9d44acc45ca8d9fdee382a255f78f 100644 (file)
@@ -560,6 +560,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;
        }