diff options
author | peter <peter@FreeBSD.org> | 1998-05-13 05:47:09 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-05-13 05:47:09 +0000 |
commit | ea57a1047fdd86ac3bdfdb750c65ba28ddefb674 (patch) | |
tree | e44e2c8b76725030e7d655123cec077fa4316d2b | |
parent | 0fe1740a29ce0be52a515c13285f957848c371ba (diff) | |
download | FreeBSD-src-ea57a1047fdd86ac3bdfdb750c65ba28ddefb674.zip FreeBSD-src-ea57a1047fdd86ac3bdfdb750c65ba28ddefb674.tar.gz |
Move the *vpp initialization earlier so that it's set in all error cases.
This should stop the 'panic: leaf should not be empty' nfs panic.
PR: 1856
Submitted by: msaitoh@spa.is.uec.ac.jp
-rw-r--r-- | sys/nfs/nfs_vnops.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index a3d222f..c70bb7f 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.83 1998/03/30 09:54:32 phk Exp $ + * $Id: nfs_vnops.c,v 1.84 1998/05/07 04:58:53 msmith Exp $ */ @@ -780,10 +780,10 @@ nfs_lookup(ap) int v3 = NFS_ISV3(dvp); struct proc *p = cnp->cn_proc; + *vpp = NULLVP; if ((flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); - *vpp = NULLVP; if (dvp->v_type != VDIR) return (ENOTDIR); lockparent = flags & LOCKPARENT; diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index a3d222f..c70bb7f 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.83 1998/03/30 09:54:32 phk Exp $ + * $Id: nfs_vnops.c,v 1.84 1998/05/07 04:58:53 msmith Exp $ */ @@ -780,10 +780,10 @@ nfs_lookup(ap) int v3 = NFS_ISV3(dvp); struct proc *p = cnp->cn_proc; + *vpp = NULLVP; if ((flags & ISLASTCN) && (dvp->v_mount->mnt_flag & MNT_RDONLY) && (cnp->cn_nameiop == DELETE || cnp->cn_nameiop == RENAME)) return (EROFS); - *vpp = NULLVP; if (dvp->v_type != VDIR) return (ENOTDIR); lockparent = flags & LOCKPARENT; |