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

!162 fix: lookup new vnode may cause parent vnode freeing

Merge pull request !162 from Far/dev
......@@ -398,6 +398,7 @@ static int Step(char **currentDir, struct Vnode **currentVnode, uint32_t flags)
goto STEP_FINISH;
}
(*currentVnode)->useCount++;
if (flags & V_DUMMY) {
ret = ProcessVirtualVnode(*currentVnode, flags, &nextVnode);
} else {
......@@ -407,6 +408,7 @@ static int Step(char **currentDir, struct Vnode **currentVnode, uint32_t flags)
ret = -ENOSYS;
}
}
(*currentVnode)->useCount--;
if (ret == LOS_OK) {
(void)PathCacheAlloc((*currentVnode), nextVnode, nextDir, len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册