diff options
author | jkh <jkh@FreeBSD.org> | 1995-01-03 07:44:10 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-01-03 07:44:10 +0000 |
commit | 0cfcd5c557938b957261515f8b41b418d5301f40 (patch) | |
tree | c258fd4357afd4d3f771bd4f4f95fbb6a358c7c9 /sys/nfsclient | |
parent | 25de52bbad89ac50843696dd386791b87d41f4f2 (diff) | |
download | FreeBSD-src-0cfcd5c557938b957261515f8b41b418d5301f40.zip FreeBSD-src-0cfcd5c557938b957261515f8b41b418d5301f40.tar.gz |
From Gene Stark:
If nd->swap_nblks is zero in nfs_mountroot(), then the system
comes up without initializing swapdev_vp to an actual vnode pointer.
The swap pager assumes a non-NULL value for swapdev_vp.
The fix is to try initializing local swap if no NFS swap space
is specified.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index c236f4b..dc4c789 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.8 1994/10/23 23:26:18 wollman Exp $ + * $Id: nfs_vfsops.c,v 1.9 1994/12/08 20:59:33 phk Exp $ */ #include <sys/param.h> @@ -290,6 +290,12 @@ nfs_mountroot() swdevt[i].sw_nblks/2); } else printf("using %d kbyte.\n",swdevt[i].sw_nblks/2); + } else { + /* + * No NFS swap space was specified, try using local disk + */ + if (bdevvp(swapdev, &swapdev_vp)) + panic("nfs_mountroot: can't setup bdevvp for swap"); } /* |