diff options
author | Jeremy Allison <jra@samba.org> | 2012-04-12 15:04:08 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-04-12 15:06:59 -0700 |
commit | fd3848636498fa357ff0085a126e374a3e91d14b (patch) | |
tree | 33bc5838d879287ceb23b6c9c81f87dbe65c5ea2 /source3/modules/vfs_aio_pthread.c | |
parent | 95839102ad9c1b052924a99ee938991a305d1add (diff) | |
download | samba-fd3848636498fa357ff0085a126e374a3e91d14b.tar.gz samba-fd3848636498fa357ff0085a126e374a3e91d14b.tar.bz2 samba-fd3848636498fa357ff0085a126e374a3e91d14b.zip |
Fix return_fn when aio was cancelled. We need to return -1, errno = ECANCELED.
Diffstat (limited to 'source3/modules/vfs_aio_pthread.c')
-rw-r--r-- | source3/modules/vfs_aio_pthread.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |