> +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 [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/