Fix for a bug in nfs_mkdir() that called vrele() instead of vput()

in the error cases, causing panics.

Adapted from similar fix to NFSv3 mkdir submitted by Mohan Srinivasan mohans
at yahoo-inc dot com

Approved by:	alfred
This commit is contained in:
Jim Rees 2004-12-01 17:58:37 +00:00
parent 743cf01795
commit 02a8ac2b7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138274

View File

@ -1564,7 +1564,7 @@ nfs4_createrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
/* XXX */
/*FREE(cnp->cn_pnbuf, M_NAMEI);*/
if (error != 0 && newvp != NULL)
vrele(newvp);
vput(newvp);
else if (error == 0)
*vpp = newvp;