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:
rees 2004-12-01 17:58:37 +00:00
parent 72af789644
commit 510cbe1e3e

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;