summaryrefslogtreecommitdiff
path: root/fs/proc/fd.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-01-04 21:35:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2024-04-15 16:03:24 -0400
commitf60d374d2cc88034385265d193a38e3f4a4b430c (patch)
tree24d9d1dbc2ccc55f62dc86d918130e7e4d8423fb /fs/proc/fd.c
parent39cd87c4eb2b893354f3b850f916353f2658ae6f (diff)
close_on_exec(): pass files_struct instead of fdtable
both callers are happier that way... Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/fd.c')
-rw-r--r--fs/proc/fd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/proc/fd.c b/fs/proc/fd.c
index 6e72e5ad42bc..0139aae19651 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -39,10 +39,8 @@ static int seq_show(struct seq_file *m, void *v)
spin_lock(&files->file_lock);
file = files_lookup_fd_locked(files, fd);
if (file) {
- struct fdtable *fdt = files_fdtable(files);
-
f_flags = file->f_flags;
- if (close_on_exec(fd, fdt))
+ if (close_on_exec(fd, files))
f_flags |= O_CLOEXEC;
get_file(file);