sysfs: add sysfs_open_file->sd and ->file
authorTejun Heo <tj@kernel.org>
Tue, 1 Oct 2013 21:42:00 +0000 (17:42 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Oct 2013 00:21:03 +0000 (17:21 -0700)
commitbcafe4eea3e58a60e9c2c63781700a9ab1d70f93
tree88026a22d2892e755551343f7245c804935d7f3f
parent58282d8dc2e7cf2b87c8fee94d7138ed08e0a2e5
sysfs: add sysfs_open_file->sd and ->file

sysfs will be converted to use seq_file for read path, which will make
it difficult to pass around multiple pointers directly.  This patch
adds sysfs_open_file->sd and ->file so that we can reach all the
necessary data structures from sysfs_open_file.

flush_write_buffer() is updated to drop @dentry which was used to
discover the sysfs_dirent as it's now available through
sysfs_open_file->sd.

This patch doesn't cause any behavior difference.

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