]> git.baikalelectronics.ru Git - kernel.git/commit
nsfs: generalize ns_get_path() for path resolution with a task
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 28 Dec 2017 02:39:08 +0000 (18:39 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Sun, 31 Dec 2017 15:12:23 +0000 (16:12 +0100)
commit1e7e5056473566cfb42f721a17788cdc282ad94b
tree8e996972f0cfbccd3334d7e12490c5d5cbdb2d24
parent91a6d86e515189986b4bfa779c0d33d0a51eb812
nsfs: generalize ns_get_path() for path resolution with a task

ns_get_path() takes struct task_struct and proc_ns_ops as its
parameters.  For path resolution directly from a namespace,
e.g. based on a networking device's net name space, we need
more flexibility.  Add a ns_get_path_cb() helper which will
allow callers to use any method of obtaining the name space
reference.  Convert ns_get_path() to use ns_get_path_cb().

Following patches will bring a networking user.

CC: Eric W. Biederman <ebiederm@xmission.com>
Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
fs/nsfs.c
include/linux/proc_ns.h