Raphael S. Carvalho
authored
Currently, namei() does vget() unconditionally if no dentry is found. This is wrong because the path can be a hard link that points to a vnode that's already in memory. To fix the problem: - Use inode number as part of the hash in vget() - Use vn_lookup() in vget() to make sure we have one vnode in memory per inode number. - Push the vget() calls down to individual filesystems and make VOP_LOOKUP return an vnode Changes since v2: - v1 dropped lock in vn_lookup, thus assert that vnode_lock is held. Changes since v3: - Fix lock ordering issue in dentry_lookup. The lock respective to the parent node must be acquired before dentry_lookup and released after the process is done. Otherwise, a second thread looking up for the same dentry may take the 'NULL' path incorrectly. Signed-off-by:Pekka Enberg <penberg@cloudius-systems.com> Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
Name | Last commit | Last update |
---|---|---|
.. | ||
devfs | ||
ramfs | ||
vfs | ||
build.mk | ||
fs.cc | ||
fs.hh | ||
unsupported.c | ||
unsupported.h |