freebsd-nq/sys/fs
Don Lewis 3a140162b4 Fix up locking problems in fifo_open() and fifo_close():
Sleep on the vnode interlock while waiting for another
	caller to increment fi_readers or fi_writers.  Hold the
	vnode interlock while incrementing fi_readers or fi_writers
	to prevent a wakeup from being missed.

	Only access fi_readers and fi_writers while holding the vnode
	lock.  Previously fifo_close() decremented their values without
	holding a lock.

	Move resource deallocation from fifo_close() to fifo_inactive(),
	which allows the VOP_CLOSE() call in the error return path in
	fifo_open() to be removed.  Fifo_open() was calling VOP_CLOSE()
	with the vnode lock held, in violation the current vnode locking
	API.  Also the way fifo_close() used vrefcnt() to decide whether
	to deallocate resources was bogus according to comments in the
	vrefcnt() implementation.

Reviewed by:	bde
2003-06-01 06:24:32 +00:00
..
cd9660 emove unused variable(s). 2003-05-31 20:19:13 +00:00
coda - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread with 2003-03-31 22:49:17 +00:00
deadfs Finish cleanup of vprint() which was begun with changing v_tag to a string. 2003-03-03 19:15:40 +00:00
devfs Remove unused variable. 2003-05-31 19:34:52 +00:00
fdescfs Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
fifofs Fix up locking problems in fifo_open() and fifo_close(): 2003-06-01 06:24:32 +00:00
hpfs Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
msdosfs Remove unused variable(s). 2003-05-31 20:29:34 +00:00
ntfs Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
nullfs Use temporary variable to avoid double expansion of macro with side effects. 2003-05-31 18:46:45 +00:00
nwfs Specify the M_WAITOK flag explicitly in the MALLOC call to silence a 2003-04-01 02:47:09 +00:00
portalfs Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00
procfs Clean up proc locking in procfs: make sure the proc lock is held before 2003-05-05 15:12:51 +00:00
pseudofs Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
smbfs Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
specfs - Add a lock for protecting against msleep(bp, ...) wakeup(bp) races. 2003-03-13 07:31:45 +00:00
udf Eliminate the separate malloc type for the sparing table. 2003-05-04 07:41:07 +00:00
umapfs Use temporary variable to avoid double expansion of macro with side effects. 2003-05-31 18:46:45 +00:00
unionfs Rename vfs_stdsync function to vfs_stdnosync which matches more 2003-03-11 22:15:10 +00:00