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
This commit is contained in:
parent
36d15cd4fb
commit
3b5745a500
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35991
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user