lkml.org 
[lkml]   [2005]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [V9fs-developer] [PATCH 2.6.13-rc3-mm2] v9fs: add fd based transport
> +static int v9fs_fd_recv(struct v9fs_transport *trans, void *v, int len)
> +{
> + struct v9fs_trans_fd *ts = trans ? trans->priv : NULL;
> +
> + return kernel_read(ts->in_file, ts->in_file->f_pos, v, len);
> +}


> +static int v9fs_fd_send(struct v9fs_transport *trans, void *v, int len)
> +{
> + struct v9fs_trans_fd *ts = trans ? trans->priv : NULL;
> + mm_segment_t oldfs = get_fs();
> + int ret = 0;
> +
> + set_fs(get_ds());
> + /* The cast to a user pointer is valid due to the set_fs() */
> + ret = vfs_write(ts->out_file, (void __user *)v, len, &ts->out_file->f_pos);
> + set_fs(oldfs);
> +
> + return ret;
> +}

Perhaps there should be a kernel_write provided by the kernel?

Russ
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-28 16:47    [W:0.068 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site