rem: err = EBADF;
add: err = FS_EBADF;
context: sys_write_attr(bool kernel, int fd, const char *name,int type,void *buffer, size_t len, off_t pos){    ofile       *f;    int         err;    vnode       *vn;    size_t      sz;    f = get_fd(kernel, fd, FD_FILE);    if (!f) {        err = EBADF;        goto error1;    }    vn = f->vn;    sz = len;    err = (*vn->ns->fs->ops.write_attr)(vn->ns->data, vn->data, name, type, buffer, &sz, pos);    if (err)        goto error2;    put_fd(f);    return sz;error2:    put_fd(f);  error1:    return err;}