Re: [V9fs-developer] [PATCH 2.6.13-rc3-mm2] v9fs: add fd based transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux