summaryrefslogtreecommitdiff
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-11-09 16:08:30 +0200
committerDavid Sterba <dsterba@suse.com>2018-12-17 14:51:27 +0100
commit06f2548f9d74a925a16967bb4ff3d860e0c6b33f (patch)
tree5794136a7f5329d4e04c5b197cc0b10ec43ba0e3 /fs/btrfs/btrfs_inode.h
parent05a37c48604c19b50873fd9663f9140c150469d1 (diff)
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 <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r--fs/btrfs/btrfs_inode.h5
1 files changed, 5 insertions, 0 deletions
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)
{