Fix two instances of handing wrong vnodes to the next layer in attribute_overlay.

The target vnode in link and the toDir vnode in rename were passed directly,
meaning that an attribute_overlay vnode was handed to the next layer causing
crashes when moving/renaming a file on ISO-only CDs for example. Fixes #3885.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30893 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2009-05-28 12:34:03 +00:00
parent 0964534941
commit 2cdc24e4ad
@@ -1282,7 +1282,8 @@ static status_t
overlay_link(fs_volume *volume, fs_vnode *vnode, const char *name,
fs_vnode *target)
{
OVERLAY_CALL(link, name, target)
OverlayInode *targetNode = (OverlayInode *)target->private_node;
OVERLAY_CALL(link, name, targetNode->SuperVnode())
return B_UNSUPPORTED;
}
@@ -1299,7 +1300,8 @@ static status_t
overlay_rename(fs_volume *volume, fs_vnode *vnode,
const char *fromName, fs_vnode *toDir, const char *toName)
{
OVERLAY_CALL(rename, fromName, toDir, toName)
OverlayInode *toDirNode = (OverlayInode *)toDir->private_node;
OVERLAY_CALL(rename, fromName, toDirNode->SuperVnode(), toName)
return B_UNSUPPORTED;
}