From d1a5a5bc80885270100f52ad4170987346e16ffc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 17 Jul 2012 17:26:42 +0200 Subject: s3-linux-aio: Fix error handling Signed-off-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Jul 17 21:22:31 CEST 2012 on sn-devel-104 --- source3/modules/vfs_aio_linux.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source3/modules/vfs_aio_linux.c') diff --git a/source3/modules/vfs_aio_linux.c b/source3/modules/vfs_aio_linux.c index d152f35501..7b739429e4 100644 --- a/source3/modules/vfs_aio_linux.c +++ b/source3/modules/vfs_aio_linux.c @@ -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; -- cgit