mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-25 05:00:39 +00:00
[XFS] Simplify XFS min/max macros.
SGI-PV: 964547 SGI-Modid: xfs-linux-melb:xfs-kern:28945a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Nathan Scott <nscott@aconex.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
This commit is contained in:
parent
24ad33ff71
commit
54aa8e26e9
@ -444,30 +444,14 @@ xfs_btree_setbuf(
|
||||
/*
|
||||
* Min and max functions for extlen, agblock, fileoff, and filblks types.
|
||||
*/
|
||||
#define XFS_EXTLEN_MIN(a,b) \
|
||||
((xfs_extlen_t)(a) < (xfs_extlen_t)(b) ? \
|
||||
(xfs_extlen_t)(a) : (xfs_extlen_t)(b))
|
||||
#define XFS_EXTLEN_MAX(a,b) \
|
||||
((xfs_extlen_t)(a) > (xfs_extlen_t)(b) ? \
|
||||
(xfs_extlen_t)(a) : (xfs_extlen_t)(b))
|
||||
#define XFS_AGBLOCK_MIN(a,b) \
|
||||
((xfs_agblock_t)(a) < (xfs_agblock_t)(b) ? \
|
||||
(xfs_agblock_t)(a) : (xfs_agblock_t)(b))
|
||||
#define XFS_AGBLOCK_MAX(a,b) \
|
||||
((xfs_agblock_t)(a) > (xfs_agblock_t)(b) ? \
|
||||
(xfs_agblock_t)(a) : (xfs_agblock_t)(b))
|
||||
#define XFS_FILEOFF_MIN(a,b) \
|
||||
((xfs_fileoff_t)(a) < (xfs_fileoff_t)(b) ? \
|
||||
(xfs_fileoff_t)(a) : (xfs_fileoff_t)(b))
|
||||
#define XFS_FILEOFF_MAX(a,b) \
|
||||
((xfs_fileoff_t)(a) > (xfs_fileoff_t)(b) ? \
|
||||
(xfs_fileoff_t)(a) : (xfs_fileoff_t)(b))
|
||||
#define XFS_FILBLKS_MIN(a,b) \
|
||||
((xfs_filblks_t)(a) < (xfs_filblks_t)(b) ? \
|
||||
(xfs_filblks_t)(a) : (xfs_filblks_t)(b))
|
||||
#define XFS_FILBLKS_MAX(a,b) \
|
||||
((xfs_filblks_t)(a) > (xfs_filblks_t)(b) ? \
|
||||
(xfs_filblks_t)(a) : (xfs_filblks_t)(b))
|
||||
#define XFS_EXTLEN_MIN(a,b) min_t(xfs_extlen_t, (a), (b))
|
||||
#define XFS_EXTLEN_MAX(a,b) max_t(xfs_extlen_t, (a), (b))
|
||||
#define XFS_AGBLOCK_MIN(a,b) min_t(xfs_agblock_t, (a), (b))
|
||||
#define XFS_AGBLOCK_MAX(a,b) max_t(xfs_agblock_t, (a), (b))
|
||||
#define XFS_FILEOFF_MIN(a,b) min_t(xfs_fileoff_t, (a), (b))
|
||||
#define XFS_FILEOFF_MAX(a,b) max_t(xfs_fileoff_t, (a), (b))
|
||||
#define XFS_FILBLKS_MIN(a,b) min_t(xfs_filblks_t, (a), (b))
|
||||
#define XFS_FILBLKS_MAX(a,b) max_t(xfs_filblks_t, (a), (b))
|
||||
|
||||
#define XFS_FSB_SANITY_CHECK(mp,fsb) \
|
||||
(XFS_FSB_TO_AGNO(mp, fsb) < mp->m_sb.sb_agcount && \
|
||||
|
Loading…
Reference in New Issue
Block a user