aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-09-20 03:05:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-12 17:51:11 -0400
commitdc2f75f0e0cac645c22c85bcf429683b3fa0d2d9 (patch)
tree775a89f5abae0cdc9688a32a6209d74c61cb5975 /fs/sysfs/inode.c
parentd6b4fd2faeb9ddf55ce09cf90b88981e579ee010 (diff)
sysfs: make sysfs_root a regular directory dirent
sysfs_root is different from a regular directory dirent in that it's of type SYSFS_ROOT and doesn't have a name. These differences aren't used by anybody and only adds to complexity. Make sysfs_root a regular directory dirent. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index b6ac4e6d6e79..c40fb9fdd04c 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -157,11 +157,6 @@ static void sysfs_init_inode(struct sysfs_dirent *sd, struct inode *inode)
157 157
158 /* initialize inode according to type */ 158 /* initialize inode according to type */
159 switch (sysfs_type(sd)) { 159 switch (sysfs_type(sd)) {
160 case SYSFS_ROOT:
161 inode->i_op = &sysfs_dir_inode_operations;
162 inode->i_fop = &sysfs_dir_operations;
163 inc_nlink(inode); /* directory, account for "." */
164 break;
165 case SYSFS_DIR: 160 case SYSFS_DIR:
166 inode->i_op = &sysfs_dir_inode_operations; 161 inode->i_op = &sysfs_dir_inode_operations;
167 inode->i_fop = &sysfs_dir_operations; 162 inode->i_fop = &sysfs_dir_operations;