diff options
| author | Tejun Heo <tj@kernel.org> | 2013-11-28 14:54:20 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 20:35:05 -0500 |
| commit | dd8a5b036b6e8d50854e130555f90f062c5eacec (patch) | |
| tree | 3fdab4cdb96462d06ea060de2de4ffe2467c531e /include/linux | |
| parent | c6fb449515f23edea828fb90a460d3622e261dba (diff) | |
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')
| -rw-r--r-- | include/linux/kernfs.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index e8b73d4a08d2..b923052c29d0 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
| @@ -9,12 +9,30 @@ | |||
| 9 | 9 | ||
| 10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
| 12 | #include <linux/list.h> | ||
| 13 | #include <linux/mutex.h> | ||
| 12 | 14 | ||
| 13 | struct file; | 15 | struct file; |
| 14 | struct iattr; | 16 | struct iattr; |
| 17 | struct seq_file; | ||
| 18 | struct vm_area_struct; | ||
| 15 | 19 | ||
| 16 | struct sysfs_dirent; | 20 | struct sysfs_dirent; |
| 17 | 21 | ||
| 22 | struct sysfs_open_file { | ||
| 23 | /* published fields */ | ||
| 24 | struct sysfs_dirent *sd; | ||
| 25 | struct file *file; | ||
| 26 | |||
| 27 | /* private fields, do not use outside kernfs proper */ | ||
| 28 | struct mutex mutex; | ||
| 29 | int event; | ||
| 30 | struct list_head list; | ||
| 31 | |||
| 32 | bool mmapped; | ||
| 33 | const struct vm_operations_struct *vm_ops; | ||
| 34 | }; | ||
| 35 | |||
| 18 | #ifdef CONFIG_SYSFS | 36 | #ifdef CONFIG_SYSFS |
| 19 | 37 | ||
| 20 | struct sysfs_dirent *kernfs_create_dir_ns(struct sysfs_dirent *parent, | 38 | struct sysfs_dirent *kernfs_create_dir_ns(struct sysfs_dirent *parent, |
