From: Thomas Veerman Date: Tue, 4 Sep 2012 12:11:54 +0000 (+0000) Subject: VFS: panic when unmount_all fails X-Git-Tag: v3.2.1~335 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/host.html?a=commitdiff_plain;h=3881e732a9b39d75cafba3afffc348e2aeb85dde;p=minix.git VFS: panic when unmount_all fails --- diff --git a/servers/vfs/mount.c b/servers/vfs/mount.c index 93b2b664b..217dba891 100644 --- a/servers/vfs/mount.c +++ b/servers/vfs/mount.c @@ -453,7 +453,7 @@ int do_umount(void) /*===========================================================================* - * unmount * + * unmount * *===========================================================================*/ int unmount( dev_t dev, /* block-special device */ @@ -551,10 +551,20 @@ void unmount_all(void) unmount(vmp->m_dev, NULL); } } + + /* Verify nothing is locked anymore */ check_vnode_locks(); check_vmnt_locks(); check_filp_locks(); check_bsf_lock(); + + /* Verify we succesfully unmounted all file systems */ + for (vmp = &vmnt[0]; vmp < &vmnt[NR_MNTS]; vmp++) { + if (vmp->m_dev != NO_DEV) { + panic("vmp still mounted: %s %d %d\n", vmp->m_label, + vmp->m_fs_e, vmp->m_dev); + } + } } /*===========================================================================*