diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-09 10:56:06 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-07-12 11:17:27 -0700 |
commit | 932b42c66cb5d0ca9800b128415b4ad6b1952b3e (patch) | |
tree | 056ae54d55ebad25ef1548a7e244f722f23e2f64 /fs/xfs/xfs_inode.h | |
parent | e45d7cb2356e6b59fe64da28324025cc6fcd3fbd (diff) |
xfs: replace XFS_IFORK_Q with a proper predicate function
Replace this shouty macro with a real C function that has a more
descriptive name.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 9bda01311c2f..2badbf9bb80d 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -77,6 +77,11 @@ typedef struct xfs_inode { struct list_head i_ioend_list; } xfs_inode_t; +static inline bool xfs_inode_has_attr_fork(struct xfs_inode *ip) +{ + return ip->i_forkoff > 0; +} + static inline struct xfs_ifork * xfs_ifork_ptr( struct xfs_inode *ip, @@ -86,7 +91,7 @@ xfs_ifork_ptr( case XFS_DATA_FORK: return &ip->i_df; case XFS_ATTR_FORK: - if (!XFS_IFORK_Q(ip)) + if (!xfs_inode_has_attr_fork(ip)) return NULL; return &ip->i_af; case XFS_COW_FORK: |