Index: nfs_vfsops.c =================================================================== RCS file: /cvsroot/src/sys/nfs/nfs_vfsops.c,v retrieving revision 1.243 diff -p -u -r1.243 nfs_vfsops.c --- nfs_vfsops.c 13 Jun 2021 10:25:11 -0000 1.243 +++ nfs_vfsops.c 17 Mar 2023 00:43:05 -0000 @@ -1135,6 +1135,7 @@ nfs_start(struct mount *mp, int flags) void nfs_vfs_init(void) { + unsigned scale; /* Initialize NFS server / client shared data. */ nfs_init(); @@ -1145,7 +1146,8 @@ nfs_vfs_init(void) /* Initialize the iod structures */ nfs_iodinit(); - nfs_commitsize = uvmexp.npages << (PAGE_SHIFT - 4); + scale = PAGE_SHIFT - 4; + nfs_commitsize = uimin(uvmexp.npages, INT_MAX >> scale) << scale; } void