diff options
author | alc <alc@FreeBSD.org> | 2004-08-10 21:47:11 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-08-10 21:47:11 +0000 |
commit | 7210ecc993d043b232cd7a909de4e8515affcf11 (patch) | |
tree | 8f072dacabdc3824e071bec6e90f8d9c44758ad4 /sys/kern/kern_physio.c | |
parent | 989ca435722b065cc739e81d4858312a7c27cf42 (diff) | |
download | FreeBSD-src-7210ecc993d043b232cd7a909de4e8515affcf11.zip FreeBSD-src-7210ecc993d043b232cd7a909de4e8515affcf11.tar.gz |
Eliminate the acquisition and release of Giant within physio(). Remove
the spl calls.
Reviewed by: phk@
Discussed with: scottl@
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r-- | sys/kern/kern_physio.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index c2c9b3f..803995c 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -36,13 +36,10 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) { int i; int error; - int spl; caddr_t sa; u_int iolen; struct buf *bp; - /* We cannot trust the device driver to hold Giant for us */ - mtx_lock(&Giant); /* Keep the process UPAGES from being swapped. XXX: why ? */ PHOLD(curproc); @@ -99,12 +96,10 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) } DEV_STRATEGY(bp); - spl = splbio(); if (uio->uio_rw == UIO_READ) bwait(bp, PRIBIO, "physrd"); else bwait(bp, PRIBIO, "physwr"); - splx(spl); if (uio->uio_segflg == UIO_USERSPACE) vunmapbuf(bp); @@ -125,6 +120,5 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) doerror: relpbuf(bp, NULL); PRELE(curproc); - mtx_unlock(&Giant); return (error); } |