提交 62e708c7 编写于 作者: O openharmony_ci 提交者: Gitee

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

Merge pull request !145 from LeonChan/lc-master
......@@ -44,6 +44,9 @@ static LosMux g_vnodeMux;
static struct Vnode *g_rootVnode = NULL;
static struct VnodeOps g_devfsOps;
extern int g_coveredVnodeTop;
extern struct Vnode *g_coveredVnodeList[100];
#define ENTRY_TO_VNODE(ptr) LOS_DL_LIST_ENTRY(ptr, struct Vnode, actFreeEntry)
#define VNODE_LRU_COUNT 10
#define DEV_VNODE_MODE 0755
......@@ -103,6 +106,11 @@ struct Vnode *VnodeReclaimLru(void)
}
if (VnodeFree(item) == LOS_OK) {
for (int i = 0; i < g_coveredVnodeTop; i++) {
if (item == g_coveredVnodeList[i]) {
PRINT_ERR("%s-%d: reclaim mounted vnode. item=%p\n", __FUNCTION__, __LINE__, item);
}
}
releaseCount++;
}
if (releaseCount >= VNODE_LRU_COUNT) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册