diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-01-26 12:34:23 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-01-26 12:34:23 +0000 |
commit | 3b2455b135be8c8bc44b80d31683f2eb1b93fc01 (patch) | |
tree | 0f0c32e2caa4168ff60d02cbe19ba8e15c4f6e3d | |
parent | 9fdc3275bee6341e05021fe4f0acf93c1119a8dc (diff) | |
download | FreeBSD-src-3b2455b135be8c8bc44b80d31683f2eb1b93fc01.zip FreeBSD-src-3b2455b135be8c8bc44b80d31683f2eb1b93fc01.tar.gz |
Remove Giant acquisition around soreceive() and sosend() in fifofs. The
bug that caused us to reintroduce it is believed to be fixed, and Kris
says he no longer sees problems with fifofs in highly parallel builds.
If this works out, we'll MFC it for 7.1.
MFC after: 3 months
Pointed out by: kris
-rw-r--r-- | sys/fs/fifofs/fifo_vnops.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index ddbd8ed..10266b7 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -705,17 +705,14 @@ static int fifo_read_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td) { struct fifoinfo *fip; - int error, sflags; + int sflags; fip = fp->f_data; KASSERT(uio->uio_rw == UIO_READ,("fifo_read mode")); if (uio->uio_resid == 0) return (0); sflags = (fp->f_flag & FNONBLOCK) ? MSG_NBIO : 0; - mtx_lock(&Giant); - error = soreceive(fip->fi_readsock, NULL, uio, NULL, NULL, &sflags); - mtx_unlock(&Giant); - return (error); + return (soreceive(fip->fi_readsock, NULL, uio, NULL, NULL, &sflags)); } static int @@ -736,13 +733,10 @@ static int fifo_write_f(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td) { struct fifoinfo *fip; - int error, sflags; + int sflags; fip = fp->f_data; KASSERT(uio->uio_rw == UIO_WRITE,("fifo_write mode")); sflags = (fp->f_flag & FNONBLOCK) ? MSG_NBIO : 0; - mtx_lock(&Giant); - error = sosend(fip->fi_writesock, NULL, uio, 0, NULL, sflags, td); - mtx_unlock(&Giant); - return (error); + return (sosend(fip->fi_writesock, NULL, uio, 0, NULL, sflags, td)); } |