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.
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);
}
}