]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_btree.h
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_btree.h
index 4e27d55a1e7302130b092c5b388f6c24b68a9d83..7440b78f9cec3b6d5c722e804b3fbc5acca756c8 100644 (file)
@@ -24,6 +24,8 @@ struct xfs_inode;
 struct xfs_mount;
 struct xfs_trans;
 
+extern kmem_zone_t     *xfs_btree_cur_zone;
+
 /*
  * This nonsense is to make -wlint happy.
  */
@@ -444,30 +446,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 && \