diff options
author | peter <peter@FreeBSD.org> | 1999-06-05 05:35:03 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-06-05 05:35:03 +0000 |
commit | 21732dea0c4943518e727150906d9117775a8a6b (patch) | |
tree | 99f7e98fb0f17e44493e65e48edc712f1686eb56 /sys/nfsclient/nfs_vfsops.c | |
parent | 06a6a667a6bf7a90688c9b4f6a3bac0a4f01a1c6 (diff) | |
download | FreeBSD-src-21732dea0c4943518e727150906d9117775a8a6b.zip FreeBSD-src-21732dea0c4943518e727150906d9117775a8a6b.tar.gz |
Various changes lifted from the OpenBSD cvs tree:
txdr_hyper and fxdr_hyper tweaks to avoid excessive CPU order knowledge.
nfs_serv.c: don't call nfsm_adj() with negative values, windows clients
could crash servers when doing a readdir of a large directory.
nfs_socket.c: Use IP_PORTRANGE to get a priviliged port without a spin
loop trying to bind(). Don't clobber a mbuf pointer or we get panics
on a NFS3ERR_JUKEBOX error from a server when reusing a freed mbuf.
nfs_subs.c: Don't loose st_blocks on NFSv2 mounts when > 2GB.
Obtained from: OpenBSD
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 7c2b6ec..89fe668 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.82 1999/02/16 10:49:54 dfr Exp $ + * $Id: nfs_vfsops.c,v 1.83 1999/04/10 18:53:29 peter Exp $ */ #include <sys/param.h> @@ -291,11 +291,11 @@ nfs_statfs(mp, sbp, p) sbp->f_iosize = nfs_iosize(nmp); if (v3) { sbp->f_bsize = NFS_FABLKSIZE; - fxdr_hyper(&sfp->sf_tbytes, &tquad); + tquad = fxdr_hyper(&sfp->sf_tbytes); sbp->f_blocks = (long)(tquad / ((u_quad_t)NFS_FABLKSIZE)); - fxdr_hyper(&sfp->sf_fbytes, &tquad); + tquad = fxdr_hyper(&sfp->sf_fbytes); sbp->f_bfree = (long)(tquad / ((u_quad_t)NFS_FABLKSIZE)); - fxdr_hyper(&sfp->sf_abytes, &tquad); + tquad = fxdr_hyper(&sfp->sf_abytes); sbp->f_bavail = (long)(tquad / ((u_quad_t)NFS_FABLKSIZE)); sbp->f_files = (fxdr_unsigned(int32_t, sfp->sf_tfiles.nfsuquad[1]) & 0x7fffffff); @@ -375,7 +375,7 @@ nfs_fsinfo(nmp, vp, cred, p) if (nmp->nm_readdirsize == 0) nmp->nm_readdirsize = max; } - fxdr_hyper(&fsp->fs_maxfilesize, &maxfsize); + maxfsize = fxdr_hyper(&fsp->fs_maxfilesize); if (maxfsize > 0 && maxfsize < nmp->nm_maxfilesize) nmp->nm_maxfilesize = maxfsize; nmp->nm_state |= NFSSTA_GOTFSINFO; |