diff options
-rw-r--r-- | fs/xfs/xfs_btree.h | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index 4e27d55a1e73..6e40a0a198ff 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h | |||
@@ -444,30 +444,14 @@ xfs_btree_setbuf( | |||
444 | /* | 444 | /* |
445 | * Min and max functions for extlen, agblock, fileoff, and filblks types. | 445 | * Min and max functions for extlen, agblock, fileoff, and filblks types. |
446 | */ | 446 | */ |
447 | #define XFS_EXTLEN_MIN(a,b) \ | 447 | #define XFS_EXTLEN_MIN(a,b) min_t(xfs_extlen_t, (a), (b)) |
448 | ((xfs_extlen_t)(a) < (xfs_extlen_t)(b) ? \ | 448 | #define XFS_EXTLEN_MAX(a,b) max_t(xfs_extlen_t, (a), (b)) |
449 | (xfs_extlen_t)(a) : (xfs_extlen_t)(b)) | 449 | #define XFS_AGBLOCK_MIN(a,b) min_t(xfs_agblock_t, (a), (b)) |
450 | #define XFS_EXTLEN_MAX(a,b) \ | 450 | #define XFS_AGBLOCK_MAX(a,b) max_t(xfs_agblock_t, (a), (b)) |
451 | ((xfs_extlen_t)(a) > (xfs_extlen_t)(b) ? \ | 451 | #define XFS_FILEOFF_MIN(a,b) min_t(xfs_fileoff_t, (a), (b)) |
452 | (xfs_extlen_t)(a) : (xfs_extlen_t)(b)) | 452 | #define XFS_FILEOFF_MAX(a,b) max_t(xfs_fileoff_t, (a), (b)) |
453 | #define XFS_AGBLOCK_MIN(a,b) \ | 453 | #define XFS_FILBLKS_MIN(a,b) min_t(xfs_filblks_t, (a), (b)) |
454 | ((xfs_agblock_t)(a) < (xfs_agblock_t)(b) ? \ | 454 | #define XFS_FILBLKS_MAX(a,b) max_t(xfs_filblks_t, (a), (b)) |
455 | (xfs_agblock_t)(a) : (xfs_agblock_t)(b)) | ||
456 | #define XFS_AGBLOCK_MAX(a,b) \ | ||
457 | ((xfs_agblock_t)(a) > (xfs_agblock_t)(b) ? \ | ||
458 | (xfs_agblock_t)(a) : (xfs_agblock_t)(b)) | ||
459 | #define XFS_FILEOFF_MIN(a,b) \ | ||
460 | ((xfs_fileoff_t)(a) < (xfs_fileoff_t)(b) ? \ | ||
461 | (xfs_fileoff_t)(a) : (xfs_fileoff_t)(b)) | ||
462 | #define XFS_FILEOFF_MAX(a,b) \ | ||
463 | ((xfs_fileoff_t)(a) > (xfs_fileoff_t)(b) ? \ | ||
464 | (xfs_fileoff_t)(a) : (xfs_fileoff_t)(b)) | ||
465 | #define XFS_FILBLKS_MIN(a,b) \ | ||
466 | ((xfs_filblks_t)(a) < (xfs_filblks_t)(b) ? \ | ||
467 | (xfs_filblks_t)(a) : (xfs_filblks_t)(b)) | ||
468 | #define XFS_FILBLKS_MAX(a,b) \ | ||
469 | ((xfs_filblks_t)(a) > (xfs_filblks_t)(b) ? \ | ||
470 | (xfs_filblks_t)(a) : (xfs_filblks_t)(b)) | ||
471 | 455 | ||
472 | #define XFS_FSB_SANITY_CHECK(mp,fsb) \ | 456 | #define XFS_FSB_SANITY_CHECK(mp,fsb) \ |
473 | (XFS_FSB_TO_AGNO(mp, fsb) < mp->m_sb.sb_agcount && \ | 457 | (XFS_FSB_TO_AGNO(mp, fsb) < mp->m_sb.sb_agcount && \ |