linux/fs/sysfs
Tejun Heo bcdde7e221 sysfs: make __sysfs_remove_dir() recursive
Currently, sysfs directory removal is inconsistent in that it would
remove any files directly under it but wouldn't recurse into
directories.  Thanks to group subdirectories, this doesn't even match
with kobject boundaries.  sysfs is in the process of being separated
out so that it can be used by multiple subsystems and we want to have
a consistent behavior - either removal of a sysfs_dirent should remove
every descendant entries or none instead of something inbetween.

This patch implements proper recursive removal in
__sysfs_remove_dir().  The function now walks its subtree in a
post-order walk to remove all descendants.

This is a behavior change but kobject / driver layer, which currently
is the only consumer, has already been updated to handle duplicate
removal attempts, so nothing should be broken after this change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-03 16:38:52 -07:00
..
bin.c sysfs: @name comes before @ns 2013-09-26 15:34:38 -07:00
dir.c sysfs: make __sysfs_remove_dir() recursive 2013-10-03 16:38:52 -07:00
file.c sysfs: remove sysfs_addrm_cxt->parent_sd 2013-10-03 16:16:43 -07:00
group.c sysfs: @name comes before @ns 2013-09-26 15:34:38 -07:00
inode.c sysfs: remove sysfs_addrm_cxt->parent_sd 2013-10-03 16:16:43 -07:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mount.c sysfs: drop kobj_ns_type handling 2013-09-26 15:30:22 -07:00
symlink.c sysfs: remove sysfs_addrm_cxt->parent_sd 2013-10-03 16:16:43 -07:00
sysfs.h sysfs: remove sysfs_addrm_cxt->parent_sd 2013-10-03 16:16:43 -07:00