From: Zygo Blaxell Date: Wed, 4 Dec 2019 06:39:41 +0000 (-0500) Subject: zygo: btrfs: check for DEAD_RELOC_TREE in fs/btrfs/relocation.c X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58c565293237591eb0bd3baeb553b34b74d08fab;p=linux zygo: btrfs: check for DEAD_RELOC_TREE in fs/btrfs/relocation.c (cherry picked from commit de97fa43b71a6515cb574419e97c921878547752) (cherry picked from commit 92038017ebf650b7dacce333ff7e6b91d296997c) --- diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 782b5dc6befc..d4887a1e43d3 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -520,6 +520,10 @@ static int should_ignore_root(struct btrfs_root *root) if (!test_bit(BTRFS_ROOT_REF_COWS, &root->state)) return 0; + if (test_bit(BTRFS_ROOT_DEAD_RELOC_TREE, &root->state)) { + WARN_ON(1); + return 0; + } reloc_root = root->reloc_root; if (!reloc_root)