summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>2003-10-24 21:07:53 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>2003-10-24 21:07:53 +0000
commit0eb3b7bb7f5efbf0df02566aff9090bd3e73405c (patch)
treeb784a25bb2ae57ad645ce339479e14b23afb260b
parent8b201c42c6700aea411efc4c32fc9fe57cb3796d (diff)
Notes
-rw-r--r--sys/kern/vfs_aio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index b746f470cbaf..6642fdef0298 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -1330,8 +1330,9 @@ _aio_aqueue(struct thread *td, struct aiocb *job, struct aio_liojob *lj, int typ
}
fp = aiocbe->fd_file = fdp->fd_ofiles[fd];
- if ((fp == NULL) || ((opcode == LIO_WRITE) && ((fp->f_flag & FWRITE) ==
- 0))) {
+ if ((fp == NULL) ||
+ ((opcode == LIO_WRITE) && ((fp->f_flag & FWRITE) == 0)) ||
+ ((opcode == LIO_READ) && ((fp->f_flag & FREAD) == 0))) {
FILEDESC_UNLOCK(fdp);
uma_zfree(aiocb_zone, aiocbe);
if (type == 0)