From: Al Viro Date: Thu, 25 Sep 2025 21:14:20 +0000 (-0400) Subject: simplify the callers of do_open_execat() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c941f26c6abc032fd7800ac7dcbfaf3cb586e21;p=thirdparty%2Fkernel%2Flinux.git simplify the callers of do_open_execat() Signed-off-by: Al Viro --- diff --git a/fs/exec.c b/fs/exec.c index b7d8081d12ead..5b4110c7522ee 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);