From: Thomas Veerman Date: Wed, 1 Feb 2012 11:34:40 +0000 (+0000) Subject: AVFS: only put mount point when it was used as one X-Git-Tag: v3.2.0~93 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=4d3a0887b48a59838b7c82df22d54b10aa872ef2;p=minix.git AVFS: only put mount point when it was used as one When a mount operation fails and the FS exits, free_proc could try and clean up resources associated with the mount point before the mount thread itself can do that. However, the clean up procedure should only clean up resources that were actually in use. --- diff --git a/servers/avfs/vmnt.c b/servers/avfs/vmnt.c index a762421f3..bb3dc0746 100644 --- a/servers/avfs/vmnt.c +++ b/servers/avfs/vmnt.c @@ -169,7 +169,11 @@ PUBLIC void vmnt_unmap_by_endpt(endpoint_t proc_e) if ((vmp = find_vmnt(proc_e)) != NULL) { fs_cancel(vmp); invalidate_filp_by_endpt(proc_e); - put_vnode(vmp->m_mounted_on); + if (vmp->m_mounted_on) { + /* Only put mount point when it was actually used as mount + * point. That is, the mount was succesful. */ + put_vnode(vmp->m_mounted_on); + } clear_vmnt(vmp); } }