VFS: unlock vmnt when out of vnodes

This commit is contained in:
Thomas Veerman 2012-04-23 13:45:14 +00:00
parent b6ff38065f
commit 068d443d12

View file

@ -55,7 +55,10 @@ int do_pipe()
if ((r = lock_vmnt(vmp, VMNT_WRITE)) != OK) return(r);
/* See if a free vnode is available */
if ((vp = get_free_vnode()) == NULL) return(err_code);
if ((vp = get_free_vnode()) == NULL) {
unlock_vmnt(vmp);
return(err_code);
}
lock_vnode(vp, VNODE_OPCL);
/* Acquire two file descriptors. */