linux/fs/sysfs
Tejun Heo 13c589d5b0 sysfs: use seq_file when reading regular files
sysfs read path implements its own buffering scheme between userland
and kernel callbacks, which essentially is a degenerate duplicate of
seq_file.  This patch replaces the custom read buffering
implementation in sysfs with seq_file.

While the amount of code reduction is small, this reduces low level
hairiness and enables future development of a new versatile API based
on seq_file so that sysfs features can be shared with other
subsystems.

As write path was already converted to not use sysfs_open_file->page,
this patch makes ->page and ->count unused and removes them.

Userland behavior remains the same except for some extreme corner
cases - e.g. sysfs will now regenerate the content each time a file is
read after a non-contiguous seek whereas the original code would keep
using the same content.  While this is a userland visible behavior
change, it is extremely unlikely to be noticeable and brings sysfs
behavior closer to that of procfs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-05 17:21:03 -07:00
..
bin.c sysfs: @name comes before @ns 2013-09-26 15:34:38 -07:00
dir.c sysfs: introduce [__]sysfs_remove() 2013-10-03 16:38:52 -07:00
file.c sysfs: use seq_file when reading regular files 2013-10-05 17:21:03 -07:00
group.c sysfs: introduce [__]sysfs_remove() 2013-10-03 16:38:52 -07:00
inode.c sysfs: introduce [__]sysfs_remove() 2013-10-03 16:38:52 -07:00
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile
mount.c sysfs: drop kobj_ns_type handling 2013-09-26 15:30:22 -07:00
symlink.c sysfs: remove sysfs_addrm_cxt->parent_sd 2013-10-03 16:16:43 -07:00
sysfs.h sysfs: introduce [__]sysfs_remove() 2013-10-03 16:38:52 -07:00