summaryrefslogtreecommitdiffstats
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-23 17:21:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-27 13:14:43 -0800
commitae2108ad32f5ca55e9895d5597e6552be1607569 (patch)
tree29efed50ed5afcd4e2e49886ad281ba50b264fa8 /include/linux/sysfs.h
parentc84a3b27798dfce928b867fa1c9f3c3fd66f0a31 (diff)
downloadlinux-stable-ae2108ad32f5ca55e9895d5597e6552be1607569.tar.gz
linux-stable-ae2108ad32f5ca55e9895d5597e6552be1607569.tar.bz2
linux-stable-ae2108ad32f5ca55e9895d5597e6552be1607569.zip
sysfs: make __sysfs_add_one() fail if the parent isn't a directory
Currently the kobject based interface guarantees that a parent sysfs_dirent is always a directory; however, the planned kernfs interface will be directly based on sysfs_dirents and the caller may specify non-directory node as the parent. Add an explicit check in __sysfs_add_one() so that such attempts fail with -EINVAL. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/sysfs.h')
0 files changed, 0 insertions, 0 deletions