aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 14:45:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:04 -0400
commit3e5190380ebef77f2b015c9e7a4ca225a3d75021 (patch)
tree08d17cd0562acf5101063e93c649f5f71f80b3b9 /fs/sysfs/inode.c
parent0c096b507f15397da890051ee73de4266d3941fb (diff)
sysfs: make sysfs_dirent->s_element a union
Make sd->s_element a union of sysfs_elem_{dir|symlink|attr|bin_attr} and rename it to s_elem. This is to achieve... * some level of type checking : changing symlink to point to sysfs_dirent instead of kobject is much safer and less painful now. * easier / standardized dereferencing * allow sysfs_elem_* to contain more than one entry Where possible, pointer is obtained by directly deferencing from sd instead of going through other entities. This reduces dependencies to dentry, inode and kobject. to_attr() and to_bin_attr() are unused now and removed. This is in preparation of object reference simplification. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 5c605b0003a8..617d10cea07d 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -272,7 +272,7 @@ int sysfs_hash_and_remove(struct dentry * dir, const char * name)
272 parent_sd = dir->d_fsdata; 272 parent_sd = dir->d_fsdata;
273 mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT); 273 mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
274 list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { 274 list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
275 if (!sd->s_element) 275 if (!sd->s_type)
276 continue; 276 continue;
277 if (!strcmp(sd->s_name, name)) { 277 if (!strcmp(sd->s_name, name)) {
278 list_del_init(&sd->s_sibling); 278 list_del_init(&sd->s_sibling);