diff --git a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp index 2d8e49cc2f..b2d6fa7a79 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp @@ -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;