btrfs: introduce btrfs_is_data_reloc_root
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 18 Nov 2021 08:58:13 +0000 (17:58 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Nov 2021 12:44:12 +0000 (13:44 +0100)
commit02c5e9e992a221a2435b7f732aba3ac11784e7ac
tree84b9b8f3b4102af87c8f1ae38d750a8c40897079
parent19e32bd1cc37c34683a214242bee7a0b114831bd
btrfs: introduce btrfs_is_data_reloc_root

commit 37f00a6d2e9c97d6e7b5c3d47c49b714c3d0b99f upstream

There are several places in our codebase where we check if a root is the
root of the data reloc tree and subsequent patches will introduce more.

Factor out the check into a small helper function instead of open coding
it multiple times.

Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/inode.c
fs/btrfs/relocation.c