summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-09-25 17:14:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2026-01-13 15:18:08 -0500
commit2c941f26c6abc032fd7800ac7dcbfaf3cb586e21 (patch)
tree4d6503daffc7e12361368d2a3996bc5e01ae1645
parent47b3b9bf93ec66ec2443f553c22e12e0475f1395 (diff)
simplify the callers of do_open_execat()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/exec.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/exec.c b/fs/exec.c
index b7d8081d12ea..5b4110c7522e 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -815,14 +815,8 @@ static struct file *do_open_execat(int fd, struct filename *name, int flags)
*/
struct file *open_exec(const char *name)
{
- struct filename *filename = getname_kernel(name);
- struct file *f = ERR_CAST(filename);
-
- if (!IS_ERR(filename)) {
- f = do_open_execat(AT_FDCWD, filename, 0);
- putname(filename);
- }
- return f;
+ CLASS(filename_kernel, filename)(name);
+ return do_open_execat(AT_FDCWD, filename, 0);
}
EXPORT_SYMBOL(open_exec);