From: Tejun Heo Date: Thu, 28 Nov 2013 19:54:22 +0000 (-0500) Subject: sysfs, kernfs: add sysfs_dirent->s_attr.size X-Git-Tag: v3.14-rc1~151^2~99 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=471bd7b78bd56c580e91e00a0f656ca922ab3b3c;p=pandora-kernel.git sysfs, kernfs: add sysfs_dirent->s_attr.size sysfs sets the size of regular files unconditionally at PAGE_SIZE and takes the size of bin files from bin_attribute. The latter is a pretty bad interface which forces bin_attribute users to create a separate copy of bin_attribute for each instance of the file - e.g. pci resource files. Add sysfs_dirent->s_attr.size so that the size can be specified separately. This unifies inode init paths of ATTR and BIN_ATTR identical and allows for generic size handling for kernfs. Unfortunately, this grows the size of sysfs_dirent by sizeof(loff_t). Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed