]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/nsfs.c
nsproxy: attach to namespaces via pidfds
[people/ms/linux.git] / fs / nsfs.c
index 4f1205725cfef03ebf82e327c08f9737bc20ae42..800c1d0eb0d026e40604e465df209cc11051e79f 100644 (file)
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -229,6 +229,11 @@ int ns_get_name(char *buf, size_t size, struct task_struct *task,
        return res;
 }
 
+bool proc_ns_file(const struct file *file)
+{
+       return file->f_op == &ns_file_operations;
+}
+
 struct file *proc_ns_fget(int fd)
 {
        struct file *file;