From 06f2548f9d74a925a16967bb4ff3d860e0c6b33f Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Fri, 9 Nov 2018 16:08:30 +0200 Subject: [PATCH] btrfs: Add function to distinguish between data and btree inode This will be used in future patches that remove the optional extent_io_ops callbacks. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/btrfs_inode.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 97d91e55b70a..213a6a63dac5 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -253,6 +253,11 @@ static inline bool btrfs_is_free_space_inode(struct btrfs_inode *inode) return false; } +static inline bool is_data_inode(struct inode *inode) +{ + return btrfs_ino(BTRFS_I(inode)) != BTRFS_BTREE_INODE_OBJECTID; +} + static inline void btrfs_mod_outstanding_extents(struct btrfs_inode *inode, int mod) { -- 2.30.2