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

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

!26 [Desc] add debug code to fix bug: kernel crashed after rmdir the umounted folder, parentVnode->data null
Merge pull request !26 from LeonChan/lc-master
......@@ -50,6 +50,8 @@
#include "fs/path_cache.h"
#include "fs/vfs_util.h"
struct Vnode *g_parentOfCoveredVnode = NULL;
/****************************************************************************
* Private Functions
****************************************************************************/
......@@ -139,6 +141,11 @@ int do_mkdir(int dirfd, const char *pathname, mode_t mode)
// alloc name cache failed is not a critical problem, let it go.
PRINT_ERR("alloc path cache %s failed\n", dirname);
}
if (!strcmp(dirname, "kernel"))
{
PRINT_ERR("%s-%d: vnode_of_kernel: %p, inode=%p \n", __FUNCTION__, __LINE__, vnode, vnode->data);
g_parentOfCoveredVnode = vnode;
}
parentVnode->useCount--;
VnodeDrop();
out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册