提交 6c531d54 编写于 作者: C chenwei

add debug code to fix bug: kernel crashed after rmdir the umounted folder, parent->data null

Change-Id: If876cf6e9cba695906fa4a562c34027bd044aed6
上级 e729bd8f
......@@ -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.
先完成此消息的编辑!
想要评论请 注册