aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kobject.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 15:27:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:08 -0400
commit608e266a2d4e62c1b98c1c573064b6afe8c06a58 (patch)
tree73d670ab6c315b42273bc9d2731ec2b8e7c199af /lib/kobject.c
parentf0b0af4792d751106e2003f96af76fa95e10c68d (diff)
sysfs: make kobj point to sysfs_dirent instead of dentry
As kobj sysfs dentries and inodes are gonna be made reclaimable, dentry can't be used as naming token for sysfs file/directory, replace kobj->dentry with kobj->sd. The only external interface change is shadow directory handling. All other changes are contained in kobj and sysfs. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index b4ebd7631700..4b08e0ff95c8 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -44,7 +44,7 @@ static int populate_dir(struct kobject * kobj)
44 return error; 44 return error;
45} 45}
46 46
47static int create_dir(struct kobject * kobj, struct dentry *shadow_parent) 47static int create_dir(struct kobject *kobj, struct sysfs_dirent *shadow_parent)
48{ 48{
49 int error = 0; 49 int error = 0;
50 if (kobject_name(kobj)) { 50 if (kobject_name(kobj)) {
@@ -162,7 +162,7 @@ static void unlink(struct kobject * kobj)
162 * @shadow_parent: sysfs directory to add to. 162 * @shadow_parent: sysfs directory to add to.
163 */ 163 */
164 164
165int kobject_shadow_add(struct kobject * kobj, struct dentry *shadow_parent) 165int kobject_shadow_add(struct kobject *kobj, struct sysfs_dirent *shadow_parent)
166{ 166{
167 int error = 0; 167 int error = 0;
168 struct kobject * parent; 168 struct kobject * parent;
@@ -338,7 +338,7 @@ int kobject_rename(struct kobject * kobj, const char *new_name)
338 /* Note : if we want to send the new name alone, not the full path, 338 /* Note : if we want to send the new name alone, not the full path,
339 * we could probably use kobject_name(kobj); */ 339 * we could probably use kobject_name(kobj); */
340 340
341 error = sysfs_rename_dir(kobj, kobj->parent->dentry, new_name); 341 error = sysfs_rename_dir(kobj, kobj->parent->sd, new_name);
342 342
343 /* This function is mostly/only used for network interface. 343 /* This function is mostly/only used for network interface.
344 * Some hotplug package track interfaces by their name and 344 * Some hotplug package track interfaces by their name and
@@ -361,8 +361,8 @@ out:
361 * @new_name: object's new name 361 * @new_name: object's new name
362 */ 362 */
363 363
364int kobject_shadow_rename(struct kobject * kobj, struct dentry *new_parent, 364int kobject_shadow_rename(struct kobject *kobj,
365 const char *new_name) 365 struct sysfs_dirent *new_parent, const char *new_name)
366{ 366{
367 int error = 0; 367 int error = 0;
368 368