mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:44:45 +01:00
simplify the callers of do_open_execat()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
47b3b9bf93
commit
2c941f26c6
1 changed files with 2 additions and 8 deletions
10
fs/exec.c
10
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue