lkml.org 
[lkml]   [2013]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 07/33] aio: add kiocb_cancel()
Date
Kent Overstreet <koverstreet@google.com> writes:

> Minor refactoring, to get rid of some duplicated code
>
> [akpm@linux-foundation.org: fix warning]
> Signed-off-by: Kent Overstreet <koverstreet@google.com>
> Cc: Zach Brown <zab@redhat.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Mark Fasheh <mfasheh@suse.com>
> Cc: Joel Becker <jlbec@evilplan.org>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Asai Thambi S P <asamymuthupa@micron.com>
> Cc: Selvan Mani <smani@micron.com>
> Cc: Sam Bradshaw <sbradshaw@micron.com>
> Cc: Jeff Moyer <jmoyer@redhat.com>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Benjamin LaHaise <bcrl@kvack.org>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

The patch looks to preserve existing behaviour. However, the man page
and the code disagree about the return code in the event that there is
no cancelation routine (well, in the event that the iocb could not be
canceled):

ERRORS
EAGAIN The iocb specified was not canceled.

EFAULT One of the data structures points to invalid data.

EINVAL The AIO context specified by ctx_id is invalid.

ENOSYS io_cancel() is not implemented on this architecture.

The code (before and after the patch) returns EINVAL when the iocb was
not canceled. Should we fix the code or the docs, here?

For the patch:

Acked-by: Jeff Moyer <jmoyer@redhat.com>


\
 
 \ /
  Last update: 2013-04-12 18:21    [W:0.490 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site