summaryrefslogtreecommitdiffstats
path: root/kernel/kmod.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-23 23:02:48 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-24 00:58:41 +0100
commit9d944ef32e83405a07376f112e9f02161d3e9731 (patch)
tree24170ff64fb83221da133e2afb53f58e840a6eee /kernel/kmod.c
parentusermodehelper: implement UMH_KILLABLE (diff)
downloadlinux-9d944ef32e83405a07376f112e9f02161d3e9731.tar.xz
linux-9d944ef32e83405a07376f112e9f02161d3e9731.zip
usermodehelper: kill umh_wait, renumber UMH_* constants
No functional changes. It is not sane to use UMH_KILLABLE with enum umh_wait, but obviously we do not want another argument in call_usermodehelper_* helpers. Kill this enum, use the plain int. Signed-off-by: Oleg 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r--kernel/kmod.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index f92f917c450c..8341de91613f 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -257,12 +257,9 @@ static void __call_usermodehelper(struct work_struct *work)
{
struct subprocess_info *sub_info =
container_of(work, struct subprocess_info, work);
- enum umh_wait wait = sub_info->wait;
+ int wait = sub_info->wait & ~UMH_KILLABLE;
pid_t pid;
- if (wait != UMH_NO_WAIT)
- wait &= ~UMH_KILLABLE;
-
/* CLONE_VFORK: wait until the usermode helper has execve'd
* successfully We need the data structures to stay around
* until that is done. */
@@ -451,8 +448,7 @@ EXPORT_SYMBOL(call_usermodehelper_setfns);
* asynchronously if wait is not set, and runs as a child of keventd.
* (ie. it runs with full root capabilities).
*/
-int call_usermodehelper_exec(struct subprocess_info *sub_info,
- enum umh_wait wait)
+int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)
{
DECLARE_COMPLETION_ONSTACK(done);
int retval = 0;