LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [-mm PATCH] sysdev_unregister() should call kobject_del()
@ 2008-02-07 23:56 Badari Pulavarty
  2008-02-08  0:38 ` Greg KH
  0 siblings, 1 reply; 10+ messages in thread
From: Badari Pulavarty @ 2008-02-07 23:56 UTC (permalink / raw)
  To: Greg KH, Andrew Morton; +Cc: lkml

Hi Greg,

While playing with hotplug memory remove on 2.6.24-mm1, I 
noticed that /sysfs directory entries are not getting removed.

sysdev_unregister() used to call kobject_unregister().
But in 2.6.24-mm1, its only dropping the ref. It should
call kobject_del() to remove the object. Correct ?

With this change, the directories are getting removed
correctly. Comments ?

Thanks,
Badari

sysdev_unregister() should call kobject_del() to remove
the object.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
---
 drivers/base/sys.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.24/drivers/base/sys.c
===================================================================
--- linux-2.6.24.orig/drivers/base/sys.c	2008-02-05 09:56:56.000000000 -0800
+++ linux-2.6.24/drivers/base/sys.c	2008-02-07 15:38:17.000000000 -0800
@@ -265,6 +265,7 @@ void sysdev_unregister(struct sys_device
 	}
 	mutex_unlock(&sysdev_drivers_lock);
 
+	kobject_del(&sysdev->kobj);
 	kobject_put(&sysdev->kobj);
 }
 



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-09  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-07 23:56 [-mm PATCH] sysdev_unregister() should call kobject_del() Badari Pulavarty
2008-02-08  0:38 ` Greg KH
2008-02-08  1:25   ` Badari Pulavarty
2008-02-08  4:55     ` Greg KH
2008-02-08  5:08       ` Badari Pulavarty
2008-02-08  5:41         ` Greg KH
2008-02-08 16:42           ` Badari Pulavarty
2008-02-08 21:30             ` Dave Hansen
2008-02-08 23:22       ` Badari Pulavarty
2008-02-08 23:57         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).