sysfs, kernfs: introduce kernfs_create_link()
authorTejun Heo <tj@kernel.org>
Sat, 23 Nov 2013 22:21:50 +0000 (17:21 -0500)
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>
Fri, 27 Mar 2015 17:13:14 +0000 (18:13 +0100)
commit0e89968765dd3fe12ef77b94aef491cf15d7403c
tree73212fa37ab50cdbbc71d80835ca8f0c8c17e37a
parent738b4ead634d8b5a2ad5bd356c56a6b004925061
sysfs, kernfs: introduce kernfs_create_link()

Separate out kernfs symlink interface - kernfs_create_link() - which
takes and returns sysfs_dirents, from sysfs_do_create_link_sd().
sysfs_do_create_link_sd() now just determines the parent and target
sysfs_dirents and invokes the new interface and handles dup warning.

This patch doesn't introduce behavior changes.

v2: Dummy implementation for !CONFIG_SYSFS updated to return -ENOSYS.

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