From: miod Date: Tue, 30 Apr 2024 16:54:47 +0000 (+0000) Subject: Do not cast off_t to u_long in uvm_vnp_setsize call (only misbehaves on 32-bit X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ae5b8881d2d47810baf666faeaf503270daa1cc8;p=openbsd Do not cast off_t to u_long in uvm_vnp_setsize call (only misbehaves on 32-bit platforms.) ok mpi@ --- diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index b9e1c6f87d0..0048f7d17df 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_bio.c,v 1.84 2019/07/25 01:43:21 cheloha Exp $ */ +/* $OpenBSD: nfs_bio.c,v 1.85 2024/04/30 16:54:47 miod Exp $ */ /* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */ /* @@ -331,7 +331,7 @@ again: np->n_flag |= NMODIFIED; if (uio->uio_offset + n > np->n_size) { np->n_size = uio->uio_offset + n; - uvm_vnp_setsize(vp, (u_long)np->n_size); + uvm_vnp_setsize(vp, np->n_size); extended = 1; } else if (uio->uio_offset + n < np->n_size) truncated = 1;