rem: mutex_lock(&fs->lock);  vnode = rootfs_find_in_dir(dir, name); if (!vnode) { status = B_ENTRY_NOT_FOUND; goto err; }   if (vnode->stream.type == STREAM_TYPE_DIR && !rootfs_is_dir_empty(vnode)) { status = B_DIRECTORY_NOT_EMPTY; goto err; }  rootfs_remove_from_dir(dir, vnode);   vfs_remove_vnode(fs->id, vnode->id);  status = 0;  err: mutex_unlock(&fs->lock);  return status;
add: return rootfs_remove(fs, dir, name, false);
context: rootfs_unlink(fs_cookie _fs, fs_vnode _dir, const char *name){	struct rootfs *fs = _fs;	struct rootfs_vnode *dir = _dir;	struct rootfs_vnode *vnode;	int status;	TRACE(("rootfs_unlink: dir 0x%x (0x%x 0x%x), name '%s'\n", dir, dir->id, name));	mutex_lock(&fs->lock);	vnode = rootfs_find_in_dir(dir, name);	if (!vnode) {		status = B_ENTRY_NOT_FOUND;		goto err;	}	// if the node is a directory, only delete it if it's empty	if (vnode->stream.type == STREAM_TYPE_DIR && !rootfs_is_dir_empty(vnode)) {		status = B_DIRECTORY_NOT_EMPTY;		goto err;	}	rootfs_remove_from_dir(dir, vnode);	// schedule this vnode to be removed when it's ref goes to zero	vfs_remove_vnode(fs->id, vnode->id);	status = 0;err:	mutex_unlock(&fs->lock);	return status;}