btrfs: use a runtime flag to indicate an inode is a free space inode
authorJosef Bacik <josef@toxicpanda.com>
Wed, 14 Sep 2022 23:04:50 +0000 (19:04 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2022 10:28:07 +0000 (12:28 +0200)
commit9b9b88546539767b8e1a39dfe322285cce4647ed
tree17493dd05beb27c00808802a4d6013d0cecf1a33
parente256927b8801f3cd1449e03629c75d5b9a379055
btrfs: use a runtime flag to indicate an inode is a free space inode

We always check the root of an inode as well as it's inode number to
determine if it's a free space inode.  This is problematic as the helper
is in a header file where it doesn't have the fs_info definition.  To
avoid this and make the check a little cleaner simply add a flag to the
runtime_flags to indicate that the inode is a free space inode, set that
when we create the inode, and then change the helper to check for this
flag.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c