提交 de1025a3 编写于 作者: O openharmony_ci 提交者: Gitee

!24 [Desc] add debug code to fix bug: kernel crashed after rmdir the umounted folder

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