From a844f4510dce23c07f3923cb42138f5fdd745017 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 2 Nov 2005 14:38:42 +1100 Subject: [XFS] Remove xfs_macros.c, xfs_macros.h, rework headers a whole lot. SGI-PV: 943122 SGI-Modid: xfs-linux:xfs-kern:23901a Signed-off-by: Nathan Scott --- fs/xfs/xfs_ialloc.h | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) (limited to 'fs/xfs/xfs_ialloc.h') diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h index db6d0015cecf..fab660dd6d1b 100644 --- a/fs/xfs/xfs_ialloc.h +++ b/fs/xfs/xfs_ialloc.h @@ -40,18 +40,8 @@ struct xfs_trans; /* * Allocation parameters for inode allocation. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_INODES) -int xfs_ialloc_inodes(struct xfs_mount *mp); -#define XFS_IALLOC_INODES(mp) xfs_ialloc_inodes(mp) -#else -#define XFS_IALLOC_INODES(mp) ((mp)->m_ialloc_inos) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_BLOCKS) -xfs_extlen_t xfs_ialloc_blocks(struct xfs_mount *mp); -#define XFS_IALLOC_BLOCKS(mp) xfs_ialloc_blocks(mp) -#else -#define XFS_IALLOC_BLOCKS(mp) ((mp)->m_ialloc_blks) -#endif +#define XFS_IALLOC_INODES(mp) (mp)->m_ialloc_inos +#define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks /* * For small block file systems, move inodes in clusters of this size. @@ -67,31 +57,25 @@ xfs_extlen_t xfs_ialloc_blocks(struct xfs_mount *mp); /* * Make an inode pointer out of the buffer/offset. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MAKE_IPTR) -struct xfs_dinode *xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o); #define XFS_MAKE_IPTR(mp,b,o) xfs_make_iptr(mp,b,o) -#else -#define XFS_MAKE_IPTR(mp,b,o) \ - ((xfs_dinode_t *)(xfs_buf_offset(b, (o) << (mp)->m_sb.sb_inodelog))) -#endif +static inline struct xfs_dinode * +xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o) +{ + return (xfs_dinode_t *) + (xfs_buf_offset(b, o << (mp)->m_sb.sb_inodelog)); +} /* * Find a free (set) bit in the inode bitmask. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_FIND_FREE) -int xfs_ialloc_find_free(xfs_inofree_t *fp); #define XFS_IALLOC_FIND_FREE(fp) xfs_ialloc_find_free(fp) -#else -#define XFS_IALLOC_FIND_FREE(fp) xfs_lowbit64(*(fp)) -#endif +static inline int xfs_ialloc_find_free(xfs_inofree_t *fp) +{ + return xfs_lowbit64(*fp); +} #ifdef __KERNEL__ - -/* - * Prototypes for visible xfs_ialloc.c routines. - */ - /* * Allocate an inode on disk. * Mode is used to tell whether the new inode will need space, and whether -- cgit v1.2.3