提交 f32caa52 编写于 作者: F Far

fix: parent point of vnode found by VfsHashGet should be updated

When fatfs_lookup find a vnode from hashlist, the field parent of vnode should be updated,
because the old parent may be reclaimed.

Close #I3NNFA
上级 6ee33eb8
......@@ -300,6 +300,7 @@ int fatfs_lookup(struct Vnode *parent, const char *path, int len, struct Vnode *
goto ERROR_UNLOCK;
}
} else {
vp->parent = parent;
free(dfp); /* hash hit dfp is no needed */
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册