summaryrefslogtreecommitdiff
path: root/fs/sysfs
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-29 17:18:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-29 18:21:01 -0800
commitcf9e5a73aaff0204801dd19cb4bd91d32f32026a (patch)
tree4a63d030a4c2ee08c06b97d348bcf42bdf7a3cd4 /fs/sysfs
parentfa736a951e456b996a76826ba78ff974414c3b55 (diff)
downloadlinux-rpi-cf9e5a73aaff0204801dd19cb4bd91d32f32026a.tar.gz
linux-rpi-cf9e5a73aaff0204801dd19cb4bd91d32f32026a.tar.bz2
linux-rpi-cf9e5a73aaff0204801dd19cb4bd91d32f32026a.zip
sysfs, kernfs: make sysfs_dirent definition public
sysfs_dirent includes some information which should be available to kernfs users - the type, flags, name and parent pointer. This patch moves sysfs_dirent definition from kernfs/kernfs-internal.h to include/linux/kernfs.h so that kernfs users can access them. The type part of flags is exported as enum kernfs_node_type, the flags kernfs_node_flag, sysfs_type() and kernfs_enable_ns() are moved to include/linux/kernfs.h and the former is updated to return the enum type. sysfs_dirent->s_parent and ->s_name are marked explicitly as public. This patch doesn't introduce any functional changes. v2: Flags exported too and kernfs_enable_ns() definition moved. v3: While moving kernfs_enable_ns() to include/linux/kernfs.h, v1 and v2 put the definition outside CONFIG_SYSFS replacing the dummy implementation with the actual implementation too. Unfortunately, this can lead to oops when !CONFIG_SYSFS because kernfs_enable_ns() may be called on a NULL @sd and now tries to dereference @sd instead of not doing anything. This issue was reported by Yuanhan Liu. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs')
0 files changed, 0 insertions, 0 deletions