simplify the callers of do_open_execat()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2025-09-25 17:14:20 -04:00
parent 47b3b9bf93
commit 2c941f26c6

View file

@ -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);