]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
aio: do not return ERESTARTSYS as a result of AIO
authorJan Kara <jack@suse.cz>
Wed, 22 Sep 2010 20:05:03 +0000 (13:05 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Sep 2010 00:18:29 +0000 (17:18 -0700)
commit94c195797a9c05cb34426abb0fd38d254d293591
tree5005b28bb6ac4987a2c51e9f9b8e30d23ef7f741
parent3cc932ba7fa6f24a84c18a581eae1269dc31efef
aio: do not return ERESTARTSYS as a result of AIO

commit a0c42bac79731276c9b2f28d54f9e658fcf843a2 upstream.

OCFS2 can return ERESTARTSYS from its write function when the process is
signalled while waiting for a cluster lock (and the filesystem is mounted
with intr mount option).  Generally, it seems reasonable to allow
filesystems to return this error code from its IO functions.  As we must
not leak ERESTARTSYS (and similar error codes) to userspace as a result of
an AIO operation, we have to properly convert it to EINTR inside AIO code
(restarting the syscall isn't really an option because other AIO could
have been already submitted by the same io_submit syscall).

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/aio.c