aio: fix wrong subsystem comments

- sys_io_destroy(): acutually return -EINVAL if the context pointed to
   is invalidIndex: linux-2.6.33-rc4/fs/aio.c
 - sys_io_getevents(): An argument specifying timeout is not `when',
   but `timeout'.
 - sys_io_getevents(): Should describe what is returned if this syscall
   succeeds.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Satoru Takeuchi 2010-08-05 11:23:11 -07:00 committed by Linus Torvalds
parent cdd854bc42
commit 642b5123ac

View File

@ -1277,7 +1277,7 @@ SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp)
/* sys_io_destroy: /* sys_io_destroy:
* Destroy the aio_context specified. May cancel any outstanding * Destroy the aio_context specified. May cancel any outstanding
* AIOs and block on completion. Will fail with -ENOSYS if not * AIOs and block on completion. Will fail with -ENOSYS if not
* implemented. May fail with -EFAULT if the context pointed to * implemented. May fail with -EINVAL if the context pointed to
* is invalid. * is invalid.
*/ */
SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx) SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx)
@ -1795,15 +1795,16 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb,
/* io_getevents: /* io_getevents:
* Attempts to read at least min_nr events and up to nr events from * Attempts to read at least min_nr events and up to nr events from
* the completion queue for the aio_context specified by ctx_id. May * the completion queue for the aio_context specified by ctx_id. If
* fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, * it succeeds, the number of read events is returned. May fail with
* if nr is out of range, if when is out of range. May fail with * -EINVAL if ctx_id is invalid, if min_nr is out of range, if nr is
* -EFAULT if any of the memory specified to is invalid. May return * out of range, if timeout is out of range. May fail with -EFAULT
* 0 or < min_nr if no events are available and the timeout specified * if any of the memory specified is invalid. May return 0 or
* by when has elapsed, where when == NULL specifies an infinite * < min_nr if the timeout specified by timeout has elapsed
* timeout. Note that the timeout pointed to by when is relative and * before sufficient events are available, where timeout == NULL
* will be updated if not NULL and the operation blocks. Will fail * specifies an infinite timeout. Note that the timeout pointed to by
* with -ENOSYS if not implemented. * timeout is relative and will be updated if not NULL and the
* operation blocks. Will fail with -ENOSYS if not implemented.
*/ */
SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id, SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,
long, min_nr, long, min_nr,