]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
simplify the callers of do_open_execat()
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 25 Sep 2025 21:14:20 +0000 (17:14 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 13 Jan 2026 20:18:08 +0000 (15:18 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exec.c

index b7d8081d12eadb8baf330e6ac3390c0f7190c4f7..5b4110c7522ee76f1935fa706a78820ab5229a46 100644 (file)
--- 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);