Skip to content

Commit

Permalink
kobject: kobject_shadow_add cleanup
Browse files Browse the repository at this point in the history
 - 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>
  • Loading branch information
Dmitriy Monakhov authored and Greg Kroah-Hartman committed Apr 27, 2007
1 parent 414264f commit 460f7e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/kobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 460f7e9

Please sign in to comment.