Skip to contentSkip to conversation

fix dmapi warning in 32bit builds

PATCH New Christoph Hellwig 1 participant 1 message Jul 14, 2007 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix dmapi warning in 32bit builds

dm_size_t is 64bit even in 32bit builds so we need to use max_t when when comparing to PAGE_CACHE_SIZE.

fs/xfs/dmapi/xfs_dm.c +2 -2
Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c
===================================================================
@@ -2636,7 +2636,7 @@ xfs_dm_probe_hole(
 	if (align == 0)
 		align = 1;
 	align <<= mp->m_sb.sb_blocklog;
-	align = MAX(align, PAGE_CACHE_SIZE);
+	align = max_t(dm_size_t, align, PAGE_CACHE_SIZE);
 
 	error = xfs_dm_round_hole(off, len, align, realsize, &roff, &rlen);
 	if (error)
@@ -2699,7 +2699,7 @@ xfs_dm_punch_hole(
 		align = 1;
 
 	align <<= mp->m_sb.sb_blocklog;
-	align = MAX(align, PAGE_CACHE_SIZE);
+	align = max_t(dm_size_t, align, PAGE_CACHE_SIZE);
 
 	if ((off + len) > realsize) {
 		xfs_iunlock(ip, XFS_IOLOCK_EXCL);