summaryrefslogtreecommitdiff
path: root/include/linux/kernfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-28 14:54:20 -0500
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>2015-03-27 14:37:28 +0100
commit0fa1c8df47d417ba8f535b3ac56f201fe83df0b7 (patch)
tree3afa0bb5383e935635ef9523180bc1cb99c33ddf /include/linux/kernfs.h
parentf1fe8ab7263237fbcc89b3bbd072385dc6947382 (diff)
downloadlinux-3.10-0fa1c8df47d417ba8f535b3ac56f201fe83df0b7.tar.gz
linux-3.10-0fa1c8df47d417ba8f535b3ac56f201fe83df0b7.tar.bz2
linux-3.10-0fa1c8df47d417ba8f535b3ac56f201fe83df0b7.zip
sysfs, kernfs: move sysfs_open_file to include/linux/kernfs.h
sysfs_open_file will be used as the primary handle for kernfs methods. Move its definition from fs/sysfs/file.c to include/linux/kernfs.h and mark the public and private fields. This is pure relocation. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/kernfs.h')
-rw-r--r--include/linux/kernfs.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index e8b73d4a08d..b923052c29d 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -9,12 +9,30 @@
#include <linux/kernel.h>
#include <linux/err.h>
+#include <linux/list.h>
+#include <linux/mutex.h>
struct file;
struct iattr;
+struct seq_file;
+struct vm_area_struct;
struct sysfs_dirent;
+struct sysfs_open_file {
+ /* published fields */
+ struct sysfs_dirent *sd;
+ struct file *file;
+
+ /* private fields, do not use outside kernfs proper */
+ struct mutex mutex;
+ int event;
+ struct list_head list;
+
+ bool mmapped;
+ const struct vm_operations_struct *vm_ops;
+};
+
#ifdef CONFIG_SYSFS
struct sysfs_dirent *kernfs_create_dir_ns(struct sysfs_dirent *parent,