linux/fs/kernfs
Tejun Heo cf9e5a73aa 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>
2013-11-29 18:21:01 -08:00
..
dir.c sysfs, kernfs: make sysfs_dirent definition public 2013-11-29 18:21:01 -08:00
file.c sysfs, kernfs: make inode number ida per kernfs_root 2013-11-29 18:10:48 -08:00
inode.c sysfs, kernfs: prepare mount path for kernfs 2013-11-29 18:16:08 -08:00
kernfs-internal.h sysfs, kernfs: make sysfs_dirent definition public 2013-11-29 18:21:01 -08:00
Makefile sysfs, kernfs: add skeletons for kernfs 2013-11-27 13:28:24 -08:00
mount.c sysfs, kernfs: move mount core code to fs/kernfs/mount.c 2013-11-29 18:16:08 -08:00
symlink.c sysfs, kernfs: make inode number ida per kernfs_root 2013-11-29 18:10:48 -08:00