• J
    aio: do not return ERESTARTSYS as a result of AIO · a0c42bac
    Jan Kara 提交于
    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: NJan Kara <jack@suse.cz>
    Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Zach Brown <zach.brown@oracle.com>
    Cc: <stable@kernel.org>
    Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    a0c42bac
aio.c 46.5 KB