s3-linux-aio: Fix error handling
authorVolker Lendecke <vl@samba.org>
Tue, 17 Jul 2012 15:26:42 +0000 (17:26 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 17 Jul 2012 19:22:31 +0000 (21:22 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 17 21:22:31 CEST 2012 on sn-devel-104

source3/modules/vfs_aio_linux.c

index d152f3550188137658b87e75f1e4e71a8b7054e2..7b739429e490d7c9ae2cd4272d18af78419847ca 100644 (file)
@@ -288,11 +288,9 @@ static void aio_linux_setup_returns(struct io_event *ioev)
 {
        struct aio_private_data *pd = (struct aio_private_data *)ioev->data;
 
-       /* ioev->res2 contains the -errno if error. */
-       /* ioev->res contains the number of bytes sent/received. */
-       if (ioev->res2) {
+       if (ioev->res < 0) {
                pd->ret_size = -1;
-               pd->ret_errno = -ioev->res2;
+               pd->ret_errno = -ioev->res;
        } else {
                pd->ret_size = ioev->res;
                pd->ret_errno = 0;