bonding: use kobject_put instead of _del after kobject_add
Subsystems (3)
PATCH 1/1 bonding: use kobject_put instead of _del after kobject_add
Otherwise the name of the kobject isn't getting freed and other stuff from kobject_cleanup() isn't getting called. kobject_put() will call kobject_del() on its own in kobject_cleanup().
--- drivers/net/bonding/bond_sysfs_slave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/bonding/bond_sysfs_slave.c +2 -2
@@ -125,7 +125,7 @@ int bond_sysfs_slave_add(struct slave *slave)for (a = slave_attrs; *a; ++a) { err =sysfs_create_file (&slave->kobj, &((*a)->attr));if (err) { -kobject_del (&slave->kobj); +kobject_put (&slave->kobj);return err; } }
@@ -140,5 +140,5 @@ void bond_sysfs_slave_del(struct slave *slave)for (a = slave_attrs; *a; ++a)sysfs_remove_file (&slave->kobj, &((*a)->attr)); -kobject_del (&slave->kobj); +kobject_put (&slave->kobj); }
Signature · 1 line
1.8.4
David Miller
maintainerFrom: Veaceslav Falico <[email protected]>
Date: Tue, 29 Jul 2014 13:27:43 +0200
Quoted 7 lines
Otherwise the name of the kobject isn't getting freed and other stuff from
kobject_cleanup()isn't getting called.kobject_put()will callkobject_del()on its own inkobject_cleanup().CC Jay Vosburgh <[email protected]>CC Andy Gospodarek <[email protected]>Signed-off-by Veaceslav Falico <[email protected]>
Introduced in v3.14, so maybe steer this to 'net' instead?
Quoted 7 lines · David Miller
From: Veaceslav Falico <[email protected]>
Date: Tue, 29 Jul 2014 13:27:43 +0200Quoted 4 lines
Otherwise the name of the kobject isn't getting freed and other stuff from
kobject_cleanup()isn't getting called.kobject_put()will callkobject_del()on its own inkobject_cleanup().
Quoted 5 lines
Quoted 3 lines
CC Jay Vosburgh <[email protected]>CC Andy Gospodarek <[email protected]>Signed-off-by Veaceslav Falico <[email protected]>Introduced in v3.14, so maybe steer this to 'net' instead?
Good idea. Should I re-send it or can you just apply it to net?
David Miller
maintainerFrom: Veaceslav Falico <[email protected]>
Date: Thu, 31 Jul 2014 12:46:01 +0200
Quoted 9 lines · David Miller
Quoted 8 lines
From: Veaceslav Falico <[email protected]>
Date: Tue, 29 Jul 2014 13:27:43 +0200Quoted 5 lines
Otherwise the name of the kobject isn't getting freed and other stuff from
kobject_cleanup()isn't getting called.kobject_put()will callkobject_del()on its own inkobject_cleanup().
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
CC Jay Vosburgh <[email protected]>CC Andy Gospodarek <[email protected]>Signed-off-by Veaceslav Falico <[email protected]>Introduced in v3.14, so maybe steer this to 'net' instead?
Good idea. Should I re-send it or can you just apply it to net?
I'll just apply it, thanks.