is_vnode_removed() is now known as get_vnode_removed() and returns its

answer through a reference parameter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20297 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-03-02 00:34:20 +00:00
parent 0690e6bc16
commit 9481e62bdb
2 changed files with 8 additions and 8 deletions

View File

@ -266,7 +266,8 @@ extern status_t put_vnode(mount_id mountID, vnode_id vnodeID);
extern status_t remove_vnode(mount_id mountID, vnode_id vnodeID);
extern status_t unremove_vnode(mount_id mountID, vnode_id vnodeID);
extern status_t unremove_vnode(mount_id mountID, vnode_id vnodeID);
extern status_t is_vnode_removed(mount_id mountID, vnode_id vnodeID);
extern status_t get_vnode_removed(mount_id mountID, vnode_id vnodeID,
bool* removed);
extern status_t notify_listener(int op, mount_id device, vnode_id parentNode,
vnode_id toParentNode, vnode_id node, const char *name);

View File

@ -2632,18 +2632,17 @@ unremove_vnode(mount_id mountID, vnode_id vnodeID)
extern "C" status_t
is_vnode_removed(mount_id mountID, vnode_id vnodeID)
get_vnode_removed(mount_id mountID, vnode_id vnodeID, bool* removed)
{
struct vnode *vnode;
mutex_lock(&sVnodeMutex);
status_t result;
vnode = lookup_vnode(mountID, vnodeID);
if (vnode)
result = vnode->remove ? 1 : 0;
else
if (struct vnode* vnode = lookup_vnode(mountID, vnodeID)) {
if (removed)
*removed = vnode->remove;
result = B_OK;
} else
result = B_BAD_VALUE;
mutex_unlock(&sVnodeMutex);