summaryrefslogtreecommitdiff
path: root/fs/fscache
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-10-01 17:42:01 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 17:21:03 -0700
commit8ef445f0807457dd7d158e43d9e8f9568c47910d (patch)
treeb3c270a7125a20112a365cf5124fd1a23d91916b /fs/fscache
parentbcafe4eea3e58a60e9c2c63781700a9ab1d70f93 (diff)
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>
Diffstat (limited to 'fs/fscache')
0 files changed, 0 insertions, 0 deletions