[Devel] [PATCH rh7 v2] ve: Add a handle to C/R aio ctx
Cyrill Gorcunov
gorcunov at virtuozzo.com
Tue Feb 16 03:10:19 PST 2016
On Tue, Feb 16, 2016 at 01:48:51PM +0300, Kirill Tkhai wrote:
> This adds ioctl, which allows to set ring buffer tail
> and to wait till aio requests are finished.
>
> v2: Add pseudosuper check
> Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
...
> +int ve_aio_ioctl(struct task_struct *task, unsigned int cmd, unsigned long arg)
> +{
> + struct ve_ioc_arg karg;
> + struct kioctx *ioctx;
> + int ret;
> +
> + if (task != current)
> + return -EINVAL;
> +
> + if (copy_from_user(&karg, (void *)arg, sizeof(karg)))
> + return -EFAULT;
> +
> + ioctx = lookup_ioctx(karg.ctx_id);
> + if (!ioctx)
> + return -EINVAL;;
Two ";;" but this is a nit, can be fixed on merging.
Reviewed-by: Cyrill Gorcunov <gorcunov at openvz.org>
Thank you!
More information about the Devel
mailing list