Volume::Link(): Also unwrap the target vnode. The client FS would get a wrong
vnode pointer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37581 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e7c3a8ffd7
commit
ae3bba85bb
@ -1749,6 +1749,7 @@ status_t
|
||||
Volume::Link(void* _dir, const char* name, void* node)
|
||||
{
|
||||
VNode* vnode = (VNode*)_dir;
|
||||
VNode* targetVnode = (VNode*)node;
|
||||
|
||||
// check capability
|
||||
if (!HasVNodeCapability(vnode, FS_VNODE_CAPABILITY_LINK))
|
||||
@ -1770,7 +1771,7 @@ Volume::Link(void* _dir, const char* name, void* node)
|
||||
request->volume = fUserlandVolume;
|
||||
request->node = vnode->clientNode;
|
||||
error = allocator.AllocateString(request->name, name);
|
||||
request->target = node;
|
||||
request->target = targetVnode->clientNode;
|
||||
if (error != B_OK)
|
||||
return error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user