freebsd-dev/sys/fs
Hans Petter Selasky 07da61a6cc Streamline use of cdevpriv and correct some corner cases.
1) It is not useful to call "devfs_clear_cdevpriv()" from
"d_close" callbacks, hence for example read, write, ioctl and
so on might be sleeping at the time of "d_close" being called
and then then freed private data can still be accessed.
Examples: dtrace, linux_compat, ksyms (all fixed by this patch)

2) In sys/dev/drm* there are some cases in which memory will
be freed twice, if open fails, first by code in the open
routine, secondly by the cdevpriv destructor. Move registration
of the cdevpriv to the end of the drm open routines.

3) devfs_clear_cdevpriv() is not called if the "d_open" callback
registered cdevpriv data and the "d_open" callback function
returned an error. Fix this.

Discussed with:	phk
MFC after:	2 weeks
2012-08-15 16:19:39 +00:00
..
cd9660 Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
coda Replace the MNT_VNODE_FOREACH interface with MNT_VNODE_FOREACH_ALL. 2012-04-17 16:28:22 +00:00
deadfs Add function vop_rename_fail(9) that performs needed cleanup for locks 2010-04-02 14:03:01 +00:00
devfs Streamline use of cdevpriv and correct some corner cases. 2012-08-15 16:19:39 +00:00
ext2fs Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
fdescfs Use NULL instead of 0 2012-03-13 10:04:13 +00:00
fifofs I am comparing current pipe code with the one in 8.3-STABLE r236165, 2012-07-31 05:48:35 +00:00
hpfs Use C99-style initialization for struct dirent in preparation for 2012-05-25 09:16:59 +00:00
msdosfs Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
nandfs Catch a corner case where ssegs could be 0 and thus i would be 0 and 2012-05-28 16:33:58 +00:00
nfs The header uma_int.h is internal uma header, unused by this source 2012-08-04 18:12:54 +00:00
nfsclient Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
nfsserver Fix two cases in the new NFS server where a tsleep() is 2012-05-12 22:20:55 +00:00
ntfs Remove a check on MNTK_UPDATE that is not really necessary as it is 2012-07-10 00:23:25 +00:00
nullfs Remove unused thread argument to vrecycle(). 2012-04-23 14:10:34 +00:00
nwfs Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
portalfs Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
procfs Add procfs to jail-mountable filesystems. 2012-02-29 00:30:18 +00:00
pseudofs Apply inlined vn_vget_ino() algorithm for ".." lookup in pseudofs. 2012-03-05 11:38:02 +00:00
smbfs Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
tmpfs After the PHYS_TO_VM_PAGE() function was de-inlined, the main reason 2012-08-05 14:11:42 +00:00
udf Use NULL instead of 0 for pointers 2012-07-22 15:40:31 +00:00
unionfs Skip directory entries with zero inode number during traversal. 2012-05-16 10:44:09 +00:00