Files
linux-legacy/include/linux
Tejun Heo a4e8b91254 sysfs: move sysfs file poll implementation to sysfs_open_dirent
Sysfs file poll implementation is scattered over sysfs and kobject.
Event numbering is done in sysfs_dirent but wait itself is done on
kobject.  This not only unecessarily bloats both kobject and
sysfs_dirent but is also buggy - if a sysfs_dirent is removed while
there still are pollers, the associaton betwen the kobject and
sysfs_dirent breaks and kobject may be freed with the pollers still
sleeping on it.

This patch moves whole poll implementation into sysfs_open_dirent.
Each time a sysfs_open_dirent is created, event number restarts from 1
and pollers sleep on sysfs_open_dirent.  As event sequence number is
meaningless without any open file and pollers should have open file
and thus sysfs_open_dirent, this ephemeral event counting works and is
a saner implementation.

This patch fixes the dnagling sleepers bug and reduces the sizes of
kobject and sysfs_dirent by one pointer.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:51:11 -07:00
..
…
…
…
2007-10-09 19:59:16 -07:00
2007-09-24 07:15:48 +02:00
…
2007-07-19 10:04:52 -07:00
…
2007-09-23 22:17:27 +02:00
2007-10-10 16:53:11 -07:00
…
…
…
…
…
2007-09-11 04:22:16 -07:00
…
…
…
…
2007-10-10 16:51:59 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-10-10 16:49:02 -07:00
…
…
…
…
…
…
…
2007-07-19 10:04:45 -07:00
…
…
…
2007-10-10 09:25:57 +02:00
…
…
2007-07-31 10:43:05 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-19 10:04:54 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-31 15:39:41 -07:00
…
…
…
…
…
2007-10-11 23:54:00 +02:00
…
…
2007-10-10 16:51:59 -07:00
…
…
…
…
…
…
…
2007-10-10 16:52:04 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-31 15:39:41 -07:00
…
…
…
…
…
…
…
…
…
…
2007-08-26 18:35:34 -07:00
…
…
2007-09-11 17:21:20 -07:00
…
…
…
2007-09-04 23:16:04 -04:00
…
…
…
…
…
…
…
…
…
…
…
2007-09-11 22:24:45 +01:00
…
…
…
…
…
2007-07-19 10:04:49 -07:00
…
2007-07-24 12:24:59 -07:00
…
…
…
…
…
…
…
…
…
2007-10-10 16:54:03 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-19 10:04:45 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-20 13:41:56 +10:00
…
…
…
…
…
…
2007-10-10 16:54:44 -07:00
…
…
…
…
…
…
…
…
…
2007-07-26 11:35:21 -07:00
2007-07-26 11:35:21 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-21 18:37:10 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-22 11:03:37 -07:00
2007-09-20 13:19:59 -07:00
2007-09-16 16:21:16 -07:00
2007-07-20 12:33:44 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-19 10:04:49 -07:00
…
…
…
…
…
…
…
…
…
2007-07-31 15:39:39 -07:00
…
2007-10-12 14:51:09 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-20 11:23:02 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2007-07-30 13:27:44 -07:00
2007-09-19 11:24:18 -07:00
…
…
…
…
…
…
…
…
…
…
2007-10-10 09:25:57 +02:00
…
…
…
…
…
…
…