diff options
Diffstat (limited to 'sys/fs/nfsclient/nfs_clbio.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clbio.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 82a3692..d63862e 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -570,7 +570,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) n = 0; if (on < bcount) - n = min((unsigned)(bcount - on), uio->uio_resid); + n = MIN((unsigned)(bcount - on), uio->uio_resid); break; case VLNK: NFSINCRGLOBAL(newnfsstats.biocache_readlinks); @@ -589,7 +589,7 @@ ncl_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) return (error); } } - n = min(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); + n = MIN(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); on = 0; break; case VDIR: @@ -757,8 +757,8 @@ nfs_directio_write(vp, uiop, cred, ioflag) struct iovec iov; do_sync: while (uiop->uio_resid > 0) { - size = min(uiop->uio_resid, wsize); - size = min(uiop->uio_iov->iov_len, size); + size = MIN(uiop->uio_resid, wsize); + size = MIN(uiop->uio_iov->iov_len, size); iov.iov_base = uiop->uio_iov->iov_base; iov.iov_len = size; uio.uio_iov = &iov; @@ -806,8 +806,8 @@ do_sync: * in NFS directio access. */ while (uiop->uio_resid > 0) { - size = min(uiop->uio_resid, wsize); - size = min(uiop->uio_iov->iov_len, size); + size = MIN(uiop->uio_resid, wsize); + size = MIN(uiop->uio_iov->iov_len, size); bp = getpbuf(&ncl_pbuf_freecnt); t_uio = malloc(sizeof(struct uio), M_NFSDIRECTIO, M_WAITOK); t_iov = malloc(sizeof(struct iovec), M_NFSDIRECTIO, M_WAITOK); @@ -1023,7 +1023,7 @@ flush_and_restart: NFSINCRGLOBAL(newnfsstats.biocache_writes); lbn = uio->uio_offset / biosize; on = uio->uio_offset & (biosize-1); - n = min((unsigned)(biosize - on), uio->uio_resid); + n = MIN((unsigned)(biosize - on), uio->uio_resid); again: /* * Handle direct append and file extension cases, calculate @@ -1572,7 +1572,7 @@ ncl_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td, * writes, but that is not possible any longer. */ int nread = bp->b_bcount - uiop->uio_resid; - int left = uiop->uio_resid; + ssize_t left = uiop->uio_resid; if (left > 0) bzero((char *)bp->b_data + nread, left); |