usermodehelper: split remaining calls to call_usermodehelper_fns()
These are the only users of call_usermodehelper_fns(). This function suffers from not being able to determine if the cleanup is called. Even if in this places the cleanup pointer is NULL, convert them to use the separate call_usermodehelper_setup() + call_usermodehelper_exec() functions so we can remove the _fns variant. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Oleg Nesterov <oleg@redhat.com> Cc: David Howells <dhowells@redhat.com> Cc: James Morris <james.l.morris@oracle.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Tejun Heo <tj@kernel.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
fb96c475f6
commit
907ed1328d
@@ -50,6 +50,7 @@ static int init_linuxrc(struct subprocess_info *info, struct cred *new)
|
||||
|
||||
static void __init handle_initrd(void)
|
||||
{
|
||||
struct subprocess_info *info;
|
||||
static char *argv[] = { "linuxrc", NULL, };
|
||||
extern char *envp_init[];
|
||||
int error;
|
||||
@@ -70,8 +71,11 @@ static void __init handle_initrd(void)
|
||||
*/
|
||||
current->flags |= PF_FREEZER_SKIP;
|
||||
|
||||
call_usermodehelper_fns("/linuxrc", argv, envp_init, UMH_WAIT_PROC,
|
||||
init_linuxrc, NULL, NULL);
|
||||
info = call_usermodehelper_setup("/linuxrc", argv, envp_init,
|
||||
GFP_KERNEL, init_linuxrc, NULL, NULL);
|
||||
if (!info)
|
||||
return;
|
||||
call_usermodehelper_exec(info, UMH_WAIT_PROC);
|
||||
|
||||
current->flags &= ~PF_FREEZER_SKIP;
|
||||
|
||||
|
Reference in New Issue
Block a user