diff options
-rw-r--r-- | source3/modules/vfs_aio_fork.c | 5 | ||||
-rw-r--r-- | source3/modules/vfs_aio_linux.c | 5 | ||||
-rw-r--r-- | source3/modules/vfs_aio_pthread.c | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/source3/modules/vfs_aio_fork.c b/source3/modules/vfs_aio_fork.c index d10cc9f40b..f3e8f7fda1 100644 --- a/source3/modules/vfs_aio_fork.c +++ b/source3/modules/vfs_aio_fork.c @@ -710,6 +710,11 @@ static ssize_t aio_fork_return_fn(struct vfs_handle_struct *handle, child->aiocb = NULL; + if (child->cancelled) { + errno = ECANCELED; + return -1; + } + if (child->retval.size == -1) { errno = child->retval.ret_errno; } diff --git a/source3/modules/vfs_aio_linux.c b/source3/modules/vfs_aio_linux.c index aa65b94859..d152f35501 100644 --- a/source3/modules/vfs_aio_linux.c +++ b/source3/modules/vfs_aio_linux.c @@ -418,6 +418,11 @@ static ssize_t aio_linux_return_fn(struct vfs_handle_struct *handle, pd->aiocb = NULL; + if (pd->cancelled) { + errno = ECANCELED; + return -1; + } + if (pd->ret_size == -1) { errno = pd->ret_errno; } diff --git a/source3/modules/vfs_aio_pthread.c b/source3/modules/vfs_aio_pthread.c index cb441bf756..36ce9ab9d1 100644 --- a/source3/modules/vfs_aio_pthread.c +++ b/source3/modules/vfs_aio_pthread.c @@ -333,6 +333,11 @@ static ssize_t aio_pthread_return_fn(struct vfs_handle_struct *handle, pd->aiocb = NULL; + if (pd->cancelled) { + errno = ECANCELED; + return -1; + } + if (pd->ret_size == -1) { errno = pd->ret_errno; } |