sysfs, kernfs: prepare write path for kernfs
authorTejun Heo <tj@kernel.org>
Thu, 28 Nov 2013 19:54:17 +0000 (14:54 -0500)
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>
Fri, 27 Mar 2015 17:13:15 +0000 (18:13 +0100)
commit532c554268d502f7b5e2ac35d19ad30762f90f9d
tree336e476ffa22ff0663cf4ee495730bd667a7f26e
parentf0c5b42e2814aa463dd44de92a628abd26edbc29
sysfs, kernfs: prepare write path for kernfs

We're in the process of separating out core sysfs functionality into
kernfs which will deal with sysfs_dirents directly.  This patch
rearranges write path so that the kernfs and sysfs parts are separate.

kernfs_file_write() handles all boilerplate work including buffer
management and locking and invokes sysfs_kf_write() or
sysfs_kf_bin_write() depending on the file type which deals with the
interaction with kobj store or bin_attribute write method.

While this patch changes the order of some operations, it shouldn't
change any visible behavior.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/file.c