sysfs, kernfs: prepare write path for kernfs
authorTejun Heo <tj@kernel.org>
Thu, 28 Nov 2013 19:54:17 +0000 (14:54 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Nov 2013 01:33:46 +0000 (17:33 -0800)
commit50b38ca086e4d9920eede98b871b971e9958d70d
tree0dc2d4f8066b15f25747fa5c024544158135ad1b
parentc2b19daf6760fae9d5db9e9d1683644728888293
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