[PATCH -next] ext4: fix the compile error of EXT4_MAX_PAGECACHE_ORDER macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhang Yi <yi.zhang@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxx>
Closes: https://lore.kernel.org/all/20250715082230.7f5bcb1e@xxxxxxxxxxxxxxxx/
Signed-off-by: Zhang Yi <yi.zhang@xxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux