Commit 13db7353 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Willy Tarreau

usermodehelper: introduce umh_complete(sub_info)

commit b3449922 upstream

Preparation.  Add the new trivial helper, umh_complete().  Currently it
simply does complete(sub_info->complete).
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
[dannf: Adjusted to apply to Debian's 2.6.32]
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent dbd3462b
...@@ -206,6 +206,11 @@ void call_usermodehelper_freeinfo(struct subprocess_info *info) ...@@ -206,6 +206,11 @@ void call_usermodehelper_freeinfo(struct subprocess_info *info)
} }
EXPORT_SYMBOL(call_usermodehelper_freeinfo); EXPORT_SYMBOL(call_usermodehelper_freeinfo);
static void umh_complete(struct subprocess_info *sub_info)
{
complete(sub_info->complete);
}
/* Keventd can't block, but this (a child) can. */ /* Keventd can't block, but this (a child) can. */
static int wait_for_helper(void *data) static int wait_for_helper(void *data)
{ {
...@@ -245,7 +250,7 @@ static int wait_for_helper(void *data) ...@@ -245,7 +250,7 @@ static int wait_for_helper(void *data)
if (sub_info->wait == UMH_NO_WAIT) if (sub_info->wait == UMH_NO_WAIT)
call_usermodehelper_freeinfo(sub_info); call_usermodehelper_freeinfo(sub_info);
else else
complete(sub_info->complete); umh_complete(sub_info);
return 0; return 0;
} }
...@@ -280,7 +285,7 @@ static void __call_usermodehelper(struct work_struct *work) ...@@ -280,7 +285,7 @@ static void __call_usermodehelper(struct work_struct *work)
/* FALLTHROUGH */ /* FALLTHROUGH */
case UMH_WAIT_EXEC: case UMH_WAIT_EXEC:
complete(sub_info->complete); umh_complete(sub_info);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment