diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-13 15:27:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:08 -0400 |
commit | 608e266a2d4e62c1b98c1c573064b6afe8c06a58 (patch) | |
tree | 73d670ab6c315b42273bc9d2731ec2b8e7c199af /fs/sysfs/bin.c | |
parent | f0b0af4792d751106e2003f96af76fa95e10c68d (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 'fs/sysfs/bin.c')
-rw-r--r-- | fs/sysfs/bin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index 3c5574a40b0..55796bdacd3 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c | |||
@@ -234,9 +234,9 @@ const struct file_operations bin_fops = { | |||
234 | 234 | ||
235 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr) | 235 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr) |
236 | { | 236 | { |
237 | BUG_ON(!kobj || !kobj->dentry || !attr); | 237 | BUG_ON(!kobj || !kobj->sd || !attr); |
238 | 238 | ||
239 | return sysfs_add_file(kobj->dentry, &attr->attr, SYSFS_KOBJ_BIN_ATTR); | 239 | return sysfs_add_file(kobj->sd, &attr->attr, SYSFS_KOBJ_BIN_ATTR); |
240 | } | 240 | } |
241 | 241 | ||
242 | 242 | ||
@@ -248,7 +248,7 @@ int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr) | |||
248 | 248 | ||
249 | void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr) | 249 | void sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr) |
250 | { | 250 | { |
251 | if (sysfs_hash_and_remove(kobj->dentry, attr->attr.name) < 0) { | 251 | if (sysfs_hash_and_remove(kobj->sd, attr->attr.name) < 0) { |
252 | printk(KERN_ERR "%s: " | 252 | printk(KERN_ERR "%s: " |
253 | "bad dentry or inode or no such file: \"%s\"\n", | 253 | "bad dentry or inode or no such file: \"%s\"\n", |
254 | __FUNCTION__, attr->attr.name); | 254 | __FUNCTION__, attr->attr.name); |