summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r--fs/sysfs/inode.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index 4c463da..037a892 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -254,8 +254,6 @@ int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
static void sysfs_init_inode(struct sysfs_dirent *sd, struct inode *inode)
{
- struct bin_attribute *bin_attr;
-
inode->i_private = sysfs_get(sd);
inode->i_mapping->a_ops = &sysfs_aops;
inode->i_mapping->backing_dev_info = &sysfs_backing_dev_info;
@@ -271,12 +269,8 @@ static void sysfs_init_inode(struct sysfs_dirent *sd, struct inode *inode)
inode->i_fop = &sysfs_dir_operations;
break;
case SYSFS_KOBJ_ATTR:
- inode->i_size = PAGE_SIZE;
- inode->i_fop = &kernfs_file_operations;
- break;
case SYSFS_KOBJ_BIN_ATTR:
- bin_attr = sd->priv;
- inode->i_size = bin_attr->size;
+ inode->i_size = sd->s_attr.size;
inode->i_fop = &kernfs_file_operations;
break;
case SYSFS_KOBJ_LINK:
OpenPOWER on IntegriCloud