kernfs: implement kernfs_walk_and_get()
authorTejun Heo <tj@kernel.org>
Fri, 20 Nov 2015 20:55:52 +0000 (15:55 -0500)
committerTejun Heo <tj@kernel.org>
Fri, 20 Nov 2015 20:55:52 +0000 (15:55 -0500)
commitbd96f76a2454c6b97d70945902e30b4c31510678
tree6700838f83e76e2558f9a36742acf81b589d3d38
parentb11cfb5807e30333b36c02701382b820b7dcf0d5
kernfs: implement kernfs_walk_and_get()

Implement kernfs_walk_and_get() which is similar to
kernfs_find_and_get() but can walk a path instead of just a name.

v2: Use strlcpy() instead of strlen() + memcpy() as suggested by
    David.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: David Miller <davem@davemloft.net>
fs/kernfs/dir.c
include/linux/kernfs.h