linux/fs/sysfs
Tejun Heo 13b3086d2e sysfs: add sysfs_dirent->s_parent
Add sysfs_dirent->s_parent.  With this patch, each sd points to and
holds a reference to its parent.  This allows walking sysfs tree
without referencing sd->s_dentry which can go away anytime if the user
doesn't control when it's deleted.

sd->s_parent is initialized and parent is referenced in
sysfs_attach_dirent().  Reference to parent is released when the sd is
released, so as long as reference to a sd is held, s_parent can be
followed.

dentry walk in sysfs_readdir() is convereted to s_parent walk.

This will be used to reimplement symlink such that it uses only
sysfs_dirent tree.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-11 16:09:04 -07:00
..
bin.c sysfs: fix error handling in binattr write() 2007-07-11 16:09:03 -07:00
dir.c sysfs: add sysfs_dirent->s_parent 2007-07-11 16:09:04 -07:00
file.c sysfs: consolidate sysfs_dirent creation functions 2007-07-11 16:09:04 -07:00
group.c security: prevent permission checking of file removal via sysfs_remove_group() 2007-04-27 10:57:33 -07:00
inode.c sysfs: fix race condition around sd->s_dentry, take#2 2007-06-12 16:08:47 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mount.c sysfs: add sysfs_dirent->s_parent 2007-07-11 16:09:04 -07:00
symlink.c sysfs: consolidate sysfs_dirent creation functions 2007-07-11 16:09:04 -07:00
sysfs.h sysfs: add sysfs_dirent->s_parent 2007-07-11 16:09:04 -07:00