summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-01-14 02:18:59 +0000
committeralfred <alfred@FreeBSD.org>2002-01-14 02:18:59 +0000
commit9bb30f875b20250a9310fbea304a230d1d6c742f (patch)
treeebad090158d040cd6e2f454778299a1f359e0783 /sys/fs
parent08d32da0a5c6bdbe31475c3af6a0a86d09560d03 (diff)
downloadFreeBSD-src-9bb30f875b20250a9310fbea304a230d1d6c742f.zip
FreeBSD-src-9bb30f875b20250a9310fbea304a230d1d6c742f.tar.gz
don't initialize the mutex in the temporary struct file, the soo_*
functions just grab f_data and don't muck with anything else so this should be ok. this fixes a panic with invariants where it thinks we've doubly initialized the filetmp mutex even though all we've done is neglect to bzero it.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/fifofs/fifo_vnops.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c
index 9fea7a2..a59e61c 100644
--- a/sys/fs/fifofs/fifo_vnops.c
+++ b/sys/fs/fifofs/fifo_vnops.c
@@ -349,8 +349,6 @@ fifo_ioctl(ap)
if (ap->a_command == FIONBIO)
return (0);
- mtx_init(&filetmp.f_mtx, "struct file", MTX_DEF);
- filetmp.f_count = 1;
if (ap->a_fflag & FREAD) {
/* filetmp is local, hence not need be locked. */
filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_readsock;
@@ -366,7 +364,6 @@ fifo_ioctl(ap)
goto err;
}
err:
- mtx_destroy(&filetmp.f_mtx);
return (error);
}
@@ -466,8 +463,6 @@ fifo_poll(ap)
struct file filetmp;
int revents = 0;
- mtx_init(&filetmp.f_mtx, "struct file", MTX_DEF);
- filetmp.f_count = 1;
if (ap->a_events & (POLLIN | POLLPRI | POLLRDNORM | POLLRDBAND)) {
filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_readsock;
if (filetmp.f_data)
@@ -480,7 +475,6 @@ fifo_poll(ap)
revents |= soo_poll(&filetmp, ap->a_events, ap->a_cred,
ap->a_td);
}
- mtx_destroy(&filetmp.f_mtx);
return (revents);
}
OpenPOWER on IntegriCloud