diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c index 0299e1cebed4..faf7c77493f6 100644 --- a/sys/kern/vfs_aio.c +++ b/sys/kern/vfs_aio.c @@ -952,7 +952,7 @@ aio_qphysio(struct proc *p, struct aiocblist *aiocbe) struct aio_liojob *lj; int fd; int s; - int cnt, notify; + int notify; cb = &aiocbe->uaiocb; fdp = p->p_fd; @@ -979,24 +979,13 @@ aio_qphysio(struct proc *p, struct aiocblist *aiocbe) if (cb->aio_nbytes % vp->v_rdev->si_bsize_phys) return (-1); - if ((cb->aio_nbytes > MAXPHYS) && (num_buf_aio >= max_buf_aio)) + if (cb->aio_nbytes > MAXPHYS) return (-1); ki = p->p_aioinfo; if (ki->kaio_buffer_count >= ki->kaio_ballowed_count) return (-1); - cnt = cb->aio_nbytes; - if (cnt > MAXPHYS) - return (-1); - - /* - * Physical I/O is charged directly to the process, so we don't have to - * fake it. - */ - aiocbe->inputcharge = 0; - aiocbe->outputcharge = 0; - ki->kaio_buffer_count++; lj = aiocbe->lio; @@ -1203,7 +1192,7 @@ _aio_aqueue(struct proc *p, struct aiocb *job, struct aio_liojob *lj, int type) unsigned int fd; struct socket *so; int s; - int error = 0; + int error; int opcode; struct aiocblist *aiocbe; struct aioproclist *aiop; @@ -2201,11 +2190,8 @@ aio_physwakeup(struct buf *bp) struct proc *p; struct kaioinfo *ki; struct aio_liojob *lj; - int s; - s = splbio(); wakeup((caddr_t)bp); - bp->b_flags |= B_DONE; aiocbe = (struct aiocblist *)bp->b_spc; if (aiocbe) { @@ -2258,7 +2244,6 @@ aio_physwakeup(struct buf *bp) if (aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL) timeout(process_signal, aiocbe, 0); } - splx(s); } #endif /* VFS_AIO */