diff options
author | Nikolay Borisov <nborisov@suse.com> | 2021-10-12 11:21:34 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-10-26 20:08:06 +0300 |
commit | d55b9e687e718130106ad1a166561786763d099f (patch) | |
tree | 8ef356d6453f211bdfc4dc68f2d02da4ef8020cb /fs/btrfs/delayed-ref.c | |
parent | 113479d5b8eb20d685da63b89e97b6ebb4206f15 (diff) | |
download | linux-d55b9e687e718130106ad1a166561786763d099f.tar.xz |
btrfs: rely on owning_root field in btrfs_add_delayed_tree_ref to detect CHUNK_ROOT
The real_root field is going to be used only by ref-verify tool so limit
its use outside of it. Blocks belonging to the chunk root will always
have it as an owner so the check is equivalent.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/delayed-ref.c')
-rw-r--r-- | fs/btrfs/delayed-ref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index 53a80163c1d7..15470582dca9 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -906,7 +906,7 @@ int btrfs_add_delayed_tree_ref(struct btrfs_trans_handle *trans, u64 parent = generic_ref->parent; u8 ref_type; - is_system = (generic_ref->real_root == BTRFS_CHUNK_TREE_OBJECTID); + is_system = (generic_ref->tree_ref.owning_root == BTRFS_CHUNK_TREE_OBJECTID); ASSERT(generic_ref->type == BTRFS_REF_METADATA && generic_ref->action); BUG_ON(extent_op && extent_op->is_data); |