sysfs, kernfs: implement kernfs_ns_enabled()
authorTejun Heo <tj@kernel.org>
Fri, 29 Nov 2013 22:19:09 +0000 (17:19 -0500)
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>
Fri, 27 Mar 2015 17:13:19 +0000 (18:13 +0100)
commit08807103786b0d0e56e6585d2c8a563463b51ed7
treeb438dd17aaa4142c4a02b7a36ab1ff38f918150c
parent02f3052e8d4552a7b3919c255bee79d4f688709e
sysfs, kernfs: implement kernfs_ns_enabled()

fs/sysfs/symlink.c::sysfs_delete_link() tests @sd->s_flags for
SYSFS_FLAG_NS.  Let's add kernfs_ns_enabled() so that sysfs doesn't
have to test sysfs_dirent flag directly.  This makes things tidier for
kernfs proper too.

This is purely cosmetic.

v2: To avoid possible NULL deref, use noop dummy implementation which
    always returns false when !CONFIG_SYSFS.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/dir.c
fs/kernfs/symlink.c
fs/sysfs/symlink.c
include/linux/kernfs.h