fs/msdosfs fatblock: use ulmin() rather than min()

PR:	277237

(cherry picked from commit 0085afdceb)
This commit is contained in:
Konstantin Belousov 2024-02-23 19:30:10 +02:00
parent a60220bbb5
commit 846bf43ca4

View File

@ -97,7 +97,7 @@ fatblock(struct msdosfsmount *pmp, u_long ofs, u_long *bnp, u_long *sizep,
fatblocksec /= 2;
}
bn = ofs / pmp->pm_fatblocksize * pmp->pm_fatblocksec;
size = roundup(min(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE,
size = roundup(ulmin(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE,
pmp->pm_BlkPerSec * DEV_BSIZE);
bn += pmp->pm_fatblk + pmp->pm_curfat * pmp->pm_FATsecs;