freebsd-dev/sys/fs
John Baldwin 8e6fa660f2 Fix some locking nits with the p_state field of struct proc:
- Hold the proc lock while changing the state from PRS_NEW to PRS_NORMAL
  in fork to honor the locking requirements.  While here, expand the scope
  of the PROC_LOCK() on the new process (p2) to avoid some LORs.  Previously
  the code was locking the new child process (p2) after it had locked the
  parent process (p1).  However, when locking two processes, the safe order
  is to lock the child first, then the parent.
- Fix various places that were checking p_state against PRS_NEW without
  having the process locked to use PROC_LOCK().  Every place was already
  locking the process, just after the PRS_NEW check.
- Remove or reduce the use of PROC_SLOCK() for places that were checking
  p_state against PRS_NEW.  The PROC_LOCK() alone is sufficient for reading
  the current state.
- Reorder fill_kinfo_proc() slightly so it only acquires PROC_SLOCK() once.

MFC after:	1 week
2011-03-24 18:40:11 +00:00
..
cd9660 Remove prtactive variable and related printf()s in the vop_inactive 2010-11-19 21:17:34 +00:00
coda Remove prtactive variable and related printf()s in the vop_inactive 2010-11-19 21:17:34 +00:00
deadfs Add function vop_rename_fail(9) that performs needed cleanup for locks 2010-04-02 14:03:01 +00:00
devfs Don't allow user created symbolic links to cover another entries marked 2010-12-15 16:49:47 +00:00
ext2fs Use ffs() to locate free bits in the inode and block bitmaps rather than 2011-02-24 22:11:36 +00:00
fdescfs Fix typos - remove duplicate "the". 2011-02-21 09:01:34 +00:00
fifofs - Improve comments about locking of the "struct fifoinfo" which is a bit 2009-11-06 22:29:46 +00:00
hpfs Remove prtactive variable and related printf()s in the vop_inactive 2010-11-19 21:17:34 +00:00
msdosfs Fix typos - remove duplicate "the". 2011-02-21 09:01:34 +00:00
nfs Quick fix to a comment. 2011-01-27 03:32:16 +00:00
nfsclient Fix some locking nits with the p_state field of struct proc: 2011-03-24 18:40:11 +00:00
nfsserver Add some FEATURE macros for various features (AUDIT/CAM/IPC/KTR/MAC/NFS/NTP/ 2011-02-25 10:11:01 +00:00
ntfs Remove prtactive variable and related printf()s in the vop_inactive 2010-11-19 21:17:34 +00:00
nullfs Fix typos - remove duplicate "is". 2011-02-23 09:22:33 +00:00
nwfs Remove unused includes of <sys/mutex.h> and <machine/mutex.h>. 2010-11-09 20:41:10 +00:00
portalfs Mfp4 CH=177274,177280,177284-177285,177297,177324-177325 2011-02-16 21:29:13 +00:00
procfs Add macro to test the sv_flags of any process. Change some places to test 2011-01-26 20:03:58 +00:00
pseudofs Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE and 2010-08-20 19:46:50 +00:00
smbfs M_USE_RESERVE has been deprecated for a decade. Eliminate any uses that 2010-10-02 17:58:57 +00:00
tmpfs Eliminate two dubious attempts at optimizing the implementation of a 2011-02-22 14:47:10 +00:00
udf Revert the previous commit. The race is not applicable to the lockmgr 2010-07-16 19:52:03 +00:00
unionfs Allowed unionfs to use whiteout not supporting file system as 2010-09-05 04:58:16 +00:00