aboutsummaryrefslogtreecommitdiff
path: root/fs/file.c
diff options
context:
space:
mode:
authorGravatar Al Viro <viro@zeniv.linux.org.uk> 2024-01-04 21:35:38 -0500
committerGravatar Al Viro <viro@zeniv.linux.org.uk> 2024-04-15 16:03:24 -0400
commitf60d374d2cc88034385265d193a38e3f4a4b430c (patch)
tree24d9d1dbc2ccc55f62dc86d918130e7e4d8423fb /fs/file.c
parentLinux 6.9-rc2 (diff)
downloadlinux-f60d374d2cc88034385265d193a38e3f4a4b430c.tar.gz
linux-f60d374d2cc88034385265d193a38e3f4a4b430c.tar.bz2
linux-f60d374d2cc88034385265d193a38e3f4a4b430c.zip
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/file.c')
-rw-r--r--fs/file.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/file.c b/fs/file.c
index 3b683b9101d8..eff5ce79f66a 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1219,12 +1219,9 @@ void set_close_on_exec(unsigned int fd, int flag)
bool get_close_on_exec(unsigned int fd)
{
- struct files_struct *files = current->files;
- struct fdtable *fdt;
bool res;
rcu_read_lock();
- fdt = files_fdtable(files);
- res = close_on_exec(fd, fdt);
+ res = close_on_exec(fd, current->files);
rcu_read_unlock();
return res;
}