From: Michael Ellerman <hidden> Date: 2007-09-13 04:25:48
It would be nice to be able to do:
for_each_thing(thing) {
error = sysfs_create_group(&thing->kobj, attrs);
if (error) {
for_each_thing(thing)
sysfs_remove_group(&thing->kobj, attrs);
return error;
}
}
But there's a BUG_ON() in sysfs_remove_group() which hits if the attributes
were never added.
As discussed here ...
http://ozlabs.org/pipermail/cbe-oss-dev/2007-July/002774.html
.. we should just return in that case instead of BUG'ing.
Signed-off-by: Michael Ellerman <redacted>
---
fs/sysfs/group.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
From: Michael Ellerman <hidden> Date: 2007-10-23 02:02:54
On 9/13/07, Michael Ellerman [off-list ref] wrote:
quoted hunk
It would be nice to be able to do:
for_each_thing(thing) {
error = sysfs_create_group(&thing->kobj, attrs);
if (error) {
for_each_thing(thing)
sysfs_remove_group(&thing->kobj, attrs);
return error;
}
}
But there's a BUG_ON() in sysfs_remove_group() which hits if the attributes
were never added.
As discussed here ...
http://ozlabs.org/pipermail/cbe-oss-dev/2007-July/002774.html
.. we should just return in that case instead of BUG'ing.
Signed-off-by: Michael Ellerman <redacted>
---
fs/sysfs/group.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
On Tue, Oct 23, 2007 at 12:02:39PM +1000, Michael Ellerman wrote:
On 9/13/07, Michael Ellerman [off-list ref] wrote:
quoted
It would be nice to be able to do:
for_each_thing(thing) {
error = sysfs_create_group(&thing->kobj, attrs);
if (error) {
for_each_thing(thing)
sysfs_remove_group(&thing->kobj, attrs);
return error;
}
}
But there's a BUG_ON() in sysfs_remove_group() which hits if the attributes
were never added.
As discussed here ...
http://ozlabs.org/pipermail/cbe-oss-dev/2007-July/002774.html
.. we should just return in that case instead of BUG'ing.
Signed-off-by: Michael Ellerman <redacted>
---
fs/sysfs/group.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
From: Michael Ellerman <hidden> Date: 2007-10-23 04:18:25
It would be nice to be able to do:
for_each_thing(thing) {
error = sysfs_create_group(&thing->kobj, attrs);
if (error) {
for_each_thing(thing)
sysfs_remove_group(&thing->kobj, attrs);
return error;
}
}
But there's a BUG_ON() in sysfs_remove_group() which hits if the attributes
were never added.
As discussed here ...
http://ozlabs.org/pipermail/cbe-oss-dev/2007-July/002774.html
.. we should just return in that case instead of BUG'ing.
Signed-off-by: Michael Ellerman <redacted>
---
fs/sysfs/group.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)