summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_aio.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2001-03-06 15:54:38 +0000
committeralc <alc@FreeBSD.org>2001-03-06 15:54:38 +0000
commit499c6382fb0d710d461571a9ac420cca1f942fea (patch)
treec329554a17b4a0a235cba550d39e1708827205af /sys/kern/vfs_aio.c
parentf689e43b3820d6639f918708b021d1afcc70918d (diff)
downloadFreeBSD-src-499c6382fb0d710d461571a9ac420cca1f942fea.zip
FreeBSD-src-499c6382fb0d710d461571a9ac420cca1f942fea.tar.gz
Add a missing splx() to aio_fphysio(). (This change is a no-op in -5.0,
but potentially significant in -4.x.) Eliminate a pointless parameter to aio_fphysio(). Remove unnecessary casts from aio_fphysio() and aio_physwakeup().
Diffstat (limited to 'sys/kern/vfs_aio.c')
-rw-r--r--sys/kern/vfs_aio.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 1fecc3a..f9d93a5 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -211,7 +211,7 @@ static void aio_process(struct aiocblist *aiocbe);
static int aio_newproc(void);
static int aio_aqueue(struct proc *p, struct aiocb *job, int type);
static void aio_physwakeup(struct buf *bp);
-static int aio_fphysio(struct proc *p, struct aiocblist *aiocbe, int type);
+static int aio_fphysio(struct proc *p, struct aiocblist *aiocbe);
static int aio_qphysio(struct proc *p, struct aiocblist *iocb);
static void aio_daemon(void *uproc);
@@ -342,7 +342,7 @@ aio_free_entry(struct aiocblist *aiocbe)
}
if (aiocbe->jobstate == JOBST_JOBQBUF) {
- if ((error = aio_fphysio(p, aiocbe, 1)) != 0)
+ if ((error = aio_fphysio(p, aiocbe)) != 0)
return error;
if (aiocbe->jobstate != JOBST_JOBBFINISHED)
panic("aio_free_entry: invalid physio finish-up state");
@@ -1096,7 +1096,7 @@ doerror:
* This waits/tests physio completion.
*/
static int
-aio_fphysio(struct proc *p, struct aiocblist *iocb, int flgwait)
+aio_fphysio(struct proc *p, struct aiocblist *iocb)
{
int s;
struct buf *bp;
@@ -1105,15 +1105,8 @@ aio_fphysio(struct proc *p, struct aiocblist *iocb, int flgwait)
bp = iocb->bp;
s = splbio();
- if (flgwait == 0) {
- if ((bp->b_flags & B_DONE) == 0) {
- splx(s);
- return EINPROGRESS;
- }
- }
-
while ((bp->b_flags & B_DONE) == 0) {
- if (tsleep((caddr_t)bp, PRIBIO, "physstr", aiod_timeout)) {
+ if (tsleep(bp, PRIBIO, "physstr", aiod_timeout)) {
if ((bp->b_flags & B_DONE) == 0) {
splx(s);
return EINPROGRESS;
@@ -1121,6 +1114,7 @@ aio_fphysio(struct proc *p, struct aiocblist *iocb, int flgwait)
break;
}
}
+ splx(s);
/* Release mapping into kernel space. */
vunmapbuf(bp);
@@ -2077,7 +2071,7 @@ aio_physwakeup(struct buf *bp)
struct kaioinfo *ki;
struct aio_liojob *lj;
- wakeup((caddr_t)bp);
+ wakeup(bp);
aiocbe = (struct aiocblist *)bp->b_spc;
if (aiocbe) {
OpenPOWER on IntegriCloud