More cleanups relating to vm object allocation failure: make sure we
call VOP_CLOSE() with vp unlocked; clean up the return path a little, in as much as our namei/vnode operation return paths can be cleared up. For a return case that was apparently never taken, this sure is ugly. Reviewed by: jeffr
This commit is contained in:
parent
3bd383f316
commit
0fed4c3c13
@ -199,8 +199,12 @@ vn_open_cred(ndp, flagp, cmode, cred)
|
||||
*/
|
||||
if (vn_canvmio(vp) == TRUE) {
|
||||
if ((error = vfs_object_create(vp, td, cred)) != 0) {
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
VOP_CLOSE(vp, fmode, cred, td);
|
||||
goto bad;
|
||||
NDFREE(ndp, NDF_ONLY_PNBUF);
|
||||
vrele(vp);
|
||||
*flagp = fmode;
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user