diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1995-06-11 19:33:05 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1995-06-11 19:33:05 +0000 |
commit | 1b1ee5553889e207087539ddafa5dfd4e28bd585 (patch) | |
tree | ba998dfb4fcad03e00a5cbf58e2a0ad648bab6e6 /sys/nfsclient/nfs_vfsops.c | |
parent | b1a97daa1e06ab0de3071f979965878fd056292b (diff) | |
download | FreeBSD-src-1b1ee5553889e207087539ddafa5dfd4e28bd585.zip FreeBSD-src-1b1ee5553889e207087539ddafa5dfd4e28bd585.tar.gz |
Merge RELENG_2_0_5 into HEAD
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 037d0dd..2daa891 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94 - * $Id: nfs_vfsops.c,v 1.13 1995/05/14 03:00:01 davidg Exp $ + * $Id: nfs_vfsops.c,v 1.14.2.1 1995/06/02 11:13:15 davidg Exp $ */ #include <sys/param.h> @@ -260,6 +260,10 @@ nfs_mountroot() } if (nd->swap_nblks) { + + /* Convert to DEV_BSIZE instead of Kilobyte */ + nd->swap_nblks *= 2; + /* * Create a fake mount point just for the swap vnode so that the * swap file can be on a different server from the rootfs. @@ -273,6 +277,9 @@ nfs_mountroot() (void) nfs_mountdiskless(buf, "/swap", 0, &nd->swap_saddr, &nd->swap_args, &vp); + VTONFS(vp)->n_size = VTONFS(vp)->n_vattr.va_size = + nd->swap_nblks * DEV_BSIZE ; + /* * Since the swap file is not the root dir of a file system, * hack it to a regular file. @@ -280,7 +287,7 @@ nfs_mountroot() vp->v_type = VREG; vp->v_flag = 0; VREF(vp); - swaponvp(p, vp, NODEV, nd->swap_nblks * 2); + swaponvp(p, vp, NODEV, nd->swap_nblks); } /* |