From: Thomas Veerman Date: Mon, 23 Apr 2012 13:45:14 +0000 (+0000) Subject: VFS: unlock vmnt when out of vnodes X-Git-Tag: v3.2.1~564 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/index.html?a=commitdiff_plain;h=068d443d12b8f570e02e9508e21a31f4faa19392;p=minix.git VFS: unlock vmnt when out of vnodes --- diff --git a/servers/vfs/pipe.c b/servers/vfs/pipe.c index d1cd7c0fc..13a359a9b 100644 --- a/servers/vfs/pipe.c +++ b/servers/vfs/pipe.c @@ -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. */