X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..de355530ae67247cbd0da700edb3a2a1dae884c2:/bsd/nfs/nfs_bio.c diff --git a/bsd/nfs/nfs_bio.c b/bsd/nfs/nfs_bio.c index 7a7394c78..4b77d6637 100644 --- a/bsd/nfs/nfs_bio.c +++ b/bsd/nfs/nfs_bio.c @@ -115,7 +115,8 @@ nfs_bioread(vp, uio, ioflag, cred, getpages) int getpages; { register struct nfsnode *np = VTONFS(vp); - register int biosize, diff, i; + register int biosize, i; + off_t diff; struct buf *bp = 0, *rabp; struct vattr vattr; struct proc *p; @@ -268,7 +269,7 @@ again: bufsize = biosize; if ((off_t)(lbn + 1) * biosize > np->n_size && (off_t)(lbn + 1) * biosize - np->n_size < biosize) { - bufsize = np->n_size - lbn * biosize; + bufsize = np->n_size - (off_t)lbn * biosize; bufsize = (bufsize + DEV_BSIZE - 1) & ~(DEV_BSIZE - 1); } bp = nfs_getcacheblk(vp, lbn, bufsize, p, operation); @@ -876,7 +877,7 @@ nfs_getcacheblk(vp, bn, size, p, operation) bp = getblk(vp, bn, size, 0, 0, operation); if( vp->v_type == VREG) - bp->b_blkno = (bn * biosize) / DEV_BSIZE; + bp->b_blkno = ((off_t)bn * biosize) / DEV_BSIZE; return (bp); }