[-mm PATCH] sysdev_unregister() should call kobject_del()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Greg KH <greg@...>, Andrew Morton <akpm@...>
Cc: lkml <linux-kernel@...>
Date: Thursday, February 7, 2008 - 7:56 pm

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);
 }
 


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[-mm PATCH] sysdev_unregister() should call kobject_del(), Badari Pulavarty, (Thu Feb 7, 7:56 pm)
Re: [-mm PATCH] sysdev_unregister() should call kobject_del(), Badari Pulavarty, (Fri Feb 8, 12:42 pm)