public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix dmapi warning in 32bit builds
@ 2007-07-14 16:10 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2007-07-14 16:10 UTC (permalink / raw)
  To: xfs

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


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c	2007-07-14 16:10:40.000000000 +0200
+++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c	2007-07-14 16:11:34.000000000 +0200
@@ -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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-14 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-14 16:10 [PATCH] fix dmapi warning in 32bit builds Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox