Fixed vfs_lookup_vnode() - it's not called with the mutex already locked anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15647 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4aeaaaae01
commit
16cfe613cd
@ -2534,14 +2534,19 @@ vfs_vnode_to_node_ref(void *_vnode, mount_id *_mountID, vnode_id *_vnodeID)
|
||||
}
|
||||
|
||||
|
||||
/** Looks up a vnode with the given mount and vnode ID.
|
||||
* Must only be used with "in-use" vnodes as it doesn't grab a reference
|
||||
* to the node.
|
||||
* It's currently only be used by file_cache_create().
|
||||
*/
|
||||
|
||||
extern "C" status_t
|
||||
vfs_lookup_vnode(mount_id mountID, vnode_id vnodeID, void **_vnode)
|
||||
{
|
||||
// ToDo: this currently doesn't use the sVnodeMutex lock - that's
|
||||
// because it's only called from file_cache_create() with that
|
||||
// lock held anyway (as it should be called from fs_read_vnode()).
|
||||
// Find a better solution!
|
||||
mutex_lock(&sVnodeMutex);
|
||||
struct vnode *vnode = lookup_vnode(mountID, vnodeID);
|
||||
mutex_unlock(&sVnodeMutex);
|
||||
|
||||
if (vnode == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user