summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/group.c
diff options
context:
space:
mode:
authorTejun Heo2013-11-28 20:54:22 +0100
committerGreg Kroah-Hartman2013-11-30 02:35:05 +0100
commit471bd7b78bd56c580e91e00a0f656ca922ab3b3c (patch)
tree20a7f9783fdd21f547fc75404b2cf702d8d4df27 /fs/sysfs/group.c
parentsysfs, kernfs: introduce kernfs_ops (diff)
downloadkernel-qcow2-linux-471bd7b78bd56c580e91e00a0f656ca922ab3b3c.tar.gz
kernel-qcow2-linux-471bd7b78bd56c580e91e00a0f656ca922ab3b3c.tar.xz
kernel-qcow2-linux-471bd7b78bd56c580e91e00a0f656ca922ab3b3c.zip
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 <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/group.c')
0 files changed, 0 insertions, 0 deletions