rem: if (err != B_OK)
add: if (err != FS_OK)
context: sys_mount(bool kernel, const char *filesystem, int fd, const char *where,	const char *device, ulong flags, void *parms, size_t len){    int                 err;    vnode_id            vnid;    vnode               *mount;    fsystem             *fs;    nspace              *ns, *ans;    void                *data;    struct stat         st;    struct my_stat      mst;    my_dev_t            dev;    my_ino_t            ino;    dev = -1;    ino = -1;    if (device) {        err = stat(device, &st);        if (err)            return NULL;        dev = st.st_dev;        ino = st.st_ino;    }    err = get_file_fd(TRUE, fd, where, TRUE, &mount);    if (err)        goto error1;    err = (*mount->ns->fs->ops.rstat)(mount->ns->data, mount->data, &mst);    if (err)        goto error2;    if (!MY_S_ISDIR(mst.st_mode)) {        err = ENOTDIR;        goto error2;    }    ns = (nspace *)malloc(sizeof(nspace));    if (!ns) {        err = ENOMEM;        goto error2;    }    fs = inc_file_system(filesystem);    if (!fs) {        err = ENODEV;        goto error3;    }    LOCK(vnlock);    if (device) {        for(ans=nshead; ans; ans=ans->next)            if ((ans->dev == dev) && (ans->ino == ino)) {                UNLOCK(vnlock);				printf("KERNEL: trying to mount %s twice (already mounted as %s)\n",					device, ans->fs->name);                err = ENODEV;                goto error4;            }    }	err = add_nspace(ns, fs, NULL, dev, ino);    UNLOCK(vnlock);	if (err != B_OK)		goto error5;    err = (*fs->ops.mount)(ns->nsid, device, flags, parms, len, &data, &vnid);    if (err)        goto error5;            LOCK(vnlock);    ns->root = lookup_vnode(ns->nsid, vnid);    ns->data = data;        if ((mount == rootvn) || (mount->mounted)) {        err = EBUSY;        goto error6;    }    mount->mounted = ns;    ns->mount = mount;    UNLOCK(vnlock);    return data;error6:    dec_vnode(ns->root, FALSE);    (*fs->ops.unmount)(data);error5:    LOCK(vnlock);    remove_nspace(ns);    UNLOCK(vnlock);error4:error3:    free(ns);error2:    dec_vnode(mount, FALSE);error1:    errno = err;    return NULL;}