From: Tejun Heo Date: Tue, 1 Oct 2013 21:42:01 +0000 (-0400) Subject: sysfs: use transient write buffer X-Git-Tag: omap-for-v3.13/fixes-for-merge-window-take2~64^2~46 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ef445f0807457dd7d158e43d9e8f9568c47910d;p=pandora-kernel.git 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 Cc: kbuild test robot Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed