Add an assertion that fifo_open() doesn't race against other threads

while sleeping to allocate fifo state: due to using the vnode lock to
serialize access to a fifo during open, it shouldn't happen (tm).

MFC after:	3 days
This commit is contained in:
Robert Watson 2005-09-12 10:06:38 +00:00
parent ba9eeb43fe
commit a1b9943657

View File

@ -196,6 +196,8 @@ fifo_open(ap)
SOCKBUF_LOCK(&rso->so_rcv);
rso->so_rcv.sb_state |= SBS_CANTRCVMORE;
SOCKBUF_UNLOCK(&rso->so_rcv);
KASSERT(vp->v_fifoinfo == NULL,
("fifo_open: v_fifoinfo race"));
vp->v_fifoinfo = fip;
}