提交 e729bd8f 编写于 作者: C chenwei

add debug code to fix bug: kernel crashed after rmdir the umounted folder

Change-Id: Id48e780054f8df37e27acf2b5fdb700d01490160
上级 936cc09d
......@@ -85,6 +85,9 @@ BOOL fs_in_use(struct Mount *mnt, const char *target)
return VnodeInUseIter(mnt->vnodeCovered);
}
struct Vnode *g_coveredVnodeList[100];
int g_coveredVnodeTop = 0;
int umount(const char *target)
{
struct Vnode *mountpt_vnode = NULL;
......@@ -192,6 +195,10 @@ int umount(const char *target)
#endif
covered_vnode->newMount = NULL;
covered_vnode->flag &= ~(VNODE_FLAG_MOUNT_NEW);
if (g_coveredVnodeTop < 100)
{
g_coveredVnodeList[g_coveredVnodeTop++] = covered_vnode;
}
VnodeDrop();
return OK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册