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
This commit is contained in:
Robert Watson 2008-01-26 12:34:23 +00:00
parent 3b9401db6f
commit c55376e791

View File

@ -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));
}