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:
@@ -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 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user