diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-05-15 18:16:54 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-04-20 22:55:35 -0400 |
commit | 38e124086282715e3b9b3d193d9308bb3499b46c (patch) | |
tree | a18f69cb50f1e19c67e20cb591072d225858a1f6 /fs/nsfs.c | |
parent | d2084fd84569fb7054c97ae6ffaf2755086fd267 (diff) |
kill the last remaining user of proc_ns_fget()
lookups by descriptor are better off closer to syscall surface...
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nsfs.c')
-rw-r--r-- | fs/nsfs.c | 18 |
1 files changed, 0 insertions, 18 deletions
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 |