linux/fs/sysfs
Tejun Heo 8ef445f080 sysfs: use transient write buffer
There isn't much to be gained by keeping around kernel buffer while a
file is open especially as the read path planned to be converted to
use seq_file and won't use the buffer.  This patch makes
sysfs_write_file() use per-write transient buffer instead of
sysfs_open_file->page.

This simplifies the write path, enables removing sysfs_open_file->page
once read path is updated and will help merging bin file write path
which already requires the use of a transient buffer due to a locking
order issue.

As the function comments of flush_write_buffer() and
sysfs_write_buffer() are being updated anyway, reformat them so that
they're more conventional.

v2: Use min_t() instead of min() in sysfs_write_file() to avoid build
    warning on arm.  Reported by build test robot.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: kbuild test robot <fengguang.wu@intel.com>
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 transient write buffer 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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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