Date: Sat, 13 Jun 2009 02:44:49 GMT From: Zhao Shuai <zhaoshuai@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 164226 for review Message-ID: <200906130244.n5D2inJH060472@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=164226 Change 164226 by zhaoshuai@zhaoshuai on 2009/06/13 02:43:56 fix fifo_open(): forget releasing the mutex before returning ENXIO. Affected files ... .. //depot/projects/soc2009/fifo/sys/fs/fifofs/fifo_vnops.c#14 edit Differences ... ==== //depot/projects/soc2009/fifo/sys/fs/fifofs/fifo_vnops.c#14 (text+ko) ==== @@ -184,10 +184,13 @@ wakeup(&fip->fi_writers); } if (ap->a_mode & FWRITE) { - if ((ap->a_mode & O_NONBLOCK) && fip->fi_readers == 0) + if ((ap->a_mode & O_NONBLOCK) && fip->fi_readers == 0) { + /* XXX release all resources here? */ + mtx_unlock(&fifo_mtx); return (ENXIO); + } fip->fi_writers++; - if (fip->fi_writers == 1 && fip->fi_readers > 0) + if (fip->fi_writers == 1 && fip->fi_readers > 0) wakeup(&fip->fi_readers); } if ((ap->a_mode & O_NONBLOCK) == 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906130244.n5D2inJH060472>