linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro
@ 2025-07-15  3:12 Zhang Yi
  2025-07-15  3:36 ` Baokun Li
  2025-07-15  4:06 ` Theodore Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Zhang Yi @ 2025-07-15  3:12 UTC (permalink / raw)
  To: linux-ext4
  Cc: linux-fsdevel, linux-kernel, tytso, adilger.kernel, jack, ojaswin,
	sfr, yi.zhang, yi.zhang, libaokun1, yukuai3, yangerkun

From: Zhang Yi <yi.zhang@huawei.com>

Since both the input and output parameters of the
EXT4_MAX_PAGECACHE_ORDER should be unsigned int type, switch to using
umin() instead of min(). This will silence the compile error reported by
_compiletime_assert() on powerpc.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20250715082230.7f5bcb1e@canb.auug.org.au/
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 1bce9ebaedb7..6fd3692c4faf 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5204,7 +5204,7 @@ static bool ext4_should_enable_large_folio(struct inode *inode)
  * where the PAGE_SIZE exceeds 4KB.
  */
 #define EXT4_MAX_PAGECACHE_ORDER(i)		\
-		min(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
+		umin(MAX_PAGECACHE_ORDER, (11 + (i)->i_blkbits - PAGE_SHIFT))
 void ext4_set_inode_mapping_order(struct inode *inode)
 {
 	if (!ext4_should_enable_large_folio(inode))
-- 
2.46.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-15 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15  3:12 [PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro Zhang Yi
2025-07-15  3:36 ` Baokun Li
2025-07-15  4:06 ` Theodore Ts'o
2025-07-15 12:52   ` Zhang Yi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).