Commit 81440e73 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Revert "sysfs: handle duplicate removal attempts in sysfs_remove_group()"

This reverts commit 54d71145.

The root cause of these "inverted" sysfs removals have now been found,
so there is no need for this patch.  Keep this functionality around so
that this type of error doesn't show up in driver code again.

Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 027a485d
...@@ -206,15 +206,6 @@ void sysfs_remove_group(struct kobject *kobj, ...@@ -206,15 +206,6 @@ void sysfs_remove_group(struct kobject *kobj,
struct sysfs_dirent *dir_sd = kobj->sd; struct sysfs_dirent *dir_sd = kobj->sd;
struct sysfs_dirent *sd; struct sysfs_dirent *sd;
/*
* Sysfs directories are now removed recursively by
* sysfs_remove_dir(). This means that the function can be called
* for a group whose sysfs entry is already removed. In that case
* all its groups are guaranteed to be already removed.
*/
if (dir_sd->s_flags & SYSFS_FLAG_REMOVED)
return;
if (grp->name) { if (grp->name) {
sd = sysfs_get_dirent(dir_sd, grp->name); sd = sysfs_get_dirent(dir_sd, grp->name);
if (!sd) { if (!sd) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment