summaryrefslogtreecommitdiffstats
path: root/lib/kobject.c
diff options
context:
space:
mode:
authorDmitriy Monakhov <dmonakhov@openvz.org>2007-03-10 14:00:10 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 10:57:28 -0700
commit460f7e9a1bde2c74f060f7ce0a308dab4be6a56b (patch)
tree06046ece68667211512733bb8a16201a076f47ac /lib/kobject.c
parent414264f959cf46f49f974b3510400e12ac3624a6 (diff)
downloadlinux-460f7e9a1bde2c74f060f7ce0a308dab4be6a56b.tar.gz
linux-460f7e9a1bde2c74f060f7ce0a308dab4be6a56b.tar.bz2
linux-460f7e9a1bde2c74f060f7ce0a308dab4be6a56b.zip
kobject: kobject_shadow_add cleanup
- 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index f66455155606..bbbfab4145e6 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -157,7 +157,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.
*/
@@ -190,8 +190,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) {