rem: struct rootfs *fs = (struct rootfs *)_fs; struct rootfs_vnode *v = (struct rootfs_vnode *)_v; struct rootfs_cookie *cookie; int err = 0;  TRACE(("rootfs_open: vnode 0x%x, stream_type %d, oflags 0x%x\n", v, st, oflags));  if (st != STREAM_TYPE_ANY && st != STREAM_TYPE_DIR) { err = ERR_VFS_WRONG_STREAM_TYPE; goto err; }  cookie = kmalloc(sizeof(struct rootfs_cookie)); if (cookie == NULL) { err = ERR_NO_MEMORY; goto err; }  mutex_lock(&fs->lock);  cookie->ptr = v->stream.dir.dir_head; cookie->oflags = oflags;  insert_cookie_in_jar(v, cookie);  *_cookie = cookie;  mutex_unlock(&fs->lock); err: return err;
add: return B_OK;
context: rootfs_open(fs_cookie _fs, fs_vnode _v, file_cookie *_cookie, stream_type st, int oflags){	struct rootfs *fs = (struct rootfs *)_fs;	struct rootfs_vnode *v = (struct rootfs_vnode *)_v;	struct rootfs_cookie *cookie;	int err = 0;	TRACE(("rootfs_open: vnode 0x%x, stream_type %d, oflags 0x%x\n", v, st, oflags));	if (st != STREAM_TYPE_ANY && st != STREAM_TYPE_DIR) {		err = ERR_VFS_WRONG_STREAM_TYPE;		goto err;	}	cookie = kmalloc(sizeof(struct rootfs_cookie));	if (cookie == NULL) {		err = ERR_NO_MEMORY;		goto err;	}	mutex_lock(&fs->lock);	cookie->ptr = v->stream.dir.dir_head;	cookie->oflags = oflags;	insert_cookie_in_jar(v, cookie);	*_cookie = cookie;	mutex_unlock(&fs->lock);err:	return err;}