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.
This commit is contained in:
parent
d4cdd59eaa
commit
4d3a0887b4
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue