From 38e124086282715e3b9b3d193d9308bb3499b46c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 15 May 2022 18:16:54 -0400 Subject: kill the last remaining user of proc_ns_fget() lookups by descriptor are better off closer to syscall surface... Reviewed-by: Christian Brauner Signed-off-by: Al Viro --- fs/nsfs.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'fs/nsfs.c') diff --git a/fs/nsfs.c b/fs/nsfs.c index f8df60b3b901..f602a96a1afe 100644 --- a/fs/nsfs.c +++ b/fs/nsfs.c @@ -235,24 +235,6 @@ 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; - - file = fget(fd); - if (!file) - return ERR_PTR(-EBADF); - - if (file->f_op != &ns_file_operations) - goto out_invalid; - - return file; - -out_invalid: - fput(file); - return ERR_PTR(-EINVAL); -} - /** * ns_match() - Returns true if current namespace matches dev/ino provided. * @ns: current namespace -- cgit