summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/backref.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index cd2d39b60be0..9c380e7edf62 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -554,6 +554,12 @@ static int resolve_indirect_ref(struct btrfs_fs_info *fs_info,
goto out_free;
}
+ if (!path->search_commit_root &&
+ test_bit(BTRFS_ROOT_DELETING, &root->state)) {
+ ret = -ENOENT;
+ goto out;
+ }
+
if (btrfs_is_testing(fs_info)) {
ret = -ENOENT;
goto out;