summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1995-08-30 17:24:15 +0000
committerdfr <dfr@FreeBSD.org>1995-08-30 17:24:15 +0000
commita1f52760830870c470c59718e1353bf909b3bae2 (patch)
tree2c5c150a29d595d6db60aa2101af4c8407cef79a /sys
parent51c6a5b9f36c82780dccde9f5522a05841042ac8 (diff)
downloadFreeBSD-src-a1f52760830870c470c59718e1353bf909b3bae2.zip
FreeBSD-src-a1f52760830870c470c59718e1353bf909b3bae2.tar.gz
Make nfs diskless work again.
Reviewed by: John Hay <jhay@mikom.csir.co.za>
Diffstat (limited to 'sys')
-rw-r--r--sys/nfs/nfs_vfsops.c4
-rw-r--r--sys/nfsclient/nfs_vfsops.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c
index 2f94027..dd09ab9 100644
--- a/sys/nfs/nfs_vfsops.c
+++ b/sys/nfs/nfs_vfsops.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94
- * $Id: nfs_vfsops.c,v 1.18 1995/08/11 11:31:12 davidg Exp $
+ * $Id: nfs_vfsops.c,v 1.19 1995/08/24 10:17:39 dfr Exp $
*/
#include <sys/param.h>
@@ -804,6 +804,8 @@ nfs_root(mp, vpp)
return (error);
vp = NFSTOV(np);
VOP_UNLOCK(vp);
+ if (vp->v_type == VNON)
+ vp->v_type = VDIR;
vp->v_flag = VROOT;
*vpp = vp;
return (0);
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c
index 2f94027..dd09ab9 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.18 1995/08/11 11:31:12 davidg Exp $
+ * $Id: nfs_vfsops.c,v 1.19 1995/08/24 10:17:39 dfr Exp $
*/
#include <sys/param.h>
@@ -804,6 +804,8 @@ nfs_root(mp, vpp)
return (error);
vp = NFSTOV(np);
VOP_UNLOCK(vp);
+ if (vp->v_type == VNON)
+ vp->v_type = VDIR;
vp->v_flag = VROOT;
*vpp = vp;
return (0);
OpenPOWER on IntegriCloud