Fix for a vnode lock leak in nfs_create() in the event of an error.

Spotted by ups@.
This commit is contained in:
Mohan Srinivasan 2007-01-31 23:10:27 +00:00
parent 38cc6e0a82
commit 4e99994cc9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166378

View File

@ -1434,6 +1434,8 @@ nfs_create(struct vop_create_args *ap)
if (vap->va_atime.tv_sec == VNOVAL)
vap->va_atime = vap->va_mtime;
error = nfs_setattrrpc(newvp, vap, cnp->cn_cred, cnp->cn_thread);
if (error)
vput(newvp);
}
if (!error) {
if (cnp->cn_flags & MAKEENTRY)