summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-09-18 23:15:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-04 01:38:52 +0200
commitbcdde7e221a8750f9b62b6d0bd31b72ea4ad9309 (patch)
treeb86620a59f4629804fc213430c2d2446d78f68b8 /drivers
parentkobject: grab an extra reference on kobject->sd to allow duplicate deletes (diff)
downloadlinux-bcdde7e221a8750f9b62b6d0bd31b72ea4ad9309.tar.xz
linux-bcdde7e221a8750f9b62b6d0bd31b72ea4ad9309.zip
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>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions