summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2006-01-26 08:37:02 +0000
committerDavid Xu <davidxu@FreeBSD.org>2006-01-26 08:37:02 +0000
commit55a122bf28f73e6c835fa65a09802090edfb9071 (patch)
tree2e307a71e217e9a6d466e34a324dbe36b8b42e5d /sys/kern/vfs_aio.c
parent499168546fe5661722070584eae9df56dcdfee8c (diff)
Notes
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 37acf949a097..52fe545e48e8 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -1339,7 +1339,7 @@ aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lj,
}
if (error) {
uma_zfree(aiocb_zone, aiocbe);
- suword(&job->_aiocb_private.error, EBADF);
+ suword(&job->_aiocb_private.error, error);
return (error);
}
aiocbe->fd_file = fp;
@@ -1544,12 +1544,14 @@ aio_return(struct thread *td, struct aio_return_args *uap)
cb->inputcharge = 0;
}
aio_free_entry(cb);
+ PROC_UNLOCK(p);
suword(&uaiocb->_aiocb_private.error, error);
suword(&uaiocb->_aiocb_private.status, status);
error = 0;
- } else
+ } else {
error = EINVAL;
- PROC_UNLOCK(p);
+ PROC_UNLOCK(p);
+ }
return (error);
}