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
This commit is contained in:
parent
6ee33eb893
commit
f32caa52c6
|
@ -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 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue