* [patch] kobject: kobject_shadow_add cleanup
@ 2007-03-10 11:00 Dmitriy Monakhov
0 siblings, 0 replies; only message in thread
From: Dmitriy Monakhov @ 2007-03-10 11:00 UTC (permalink / raw)
To: linux-kernel; +Cc: gregkh
- correct function name in comments
- parrent assignment does metter only inside "if" block,
so move it inside this block.
Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
diff --git a/lib/kobject.c b/lib/kobject.c
index b94f208..e4b477d 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -201,7 +201,7 @@ static void unlink(struct kobject * kobj)
}
/**
- * kobject_add - add an object to the hierarchy.
+ * kobject_shadow_add - add an object to the hierarchy.
* @kobj: object.
* @shadow_parent: sysfs directory to add to.
*/
@@ -234,8 +234,8 @@ int kobject_shadow_add(struct kobject * kobj, struct dentry *shadow_parent)
list_add_tail(&kobj->entry,&kobj->kset->list);
spin_unlock(&kobj->kset->list_lock);
+ kobj->parent = parent;
}
- kobj->parent = parent;
error = create_dir(kobj, shadow_parent);
if (error) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-10 10:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-10 11:00 [patch] kobject: kobject_shadow_add cleanup Dmitriy Monakhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox