From: Oleg Nesterov Date: Fri, 23 Mar 2012 22:02:47 +0000 (-0700) Subject: usermodehelper: introduce umh_complete(sub_info) X-Git-Tag: v3.2.40~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ba91066fd4f9b4340ae88ce5cb18cd4b58d9184;p=thirdparty%2Fkernel%2Fstable.git usermodehelper: introduce umh_complete(sub_info) commit b3449922502f5a161ee2b5022a33aec8472fbf18 upstream. Preparation. Add the new trivial helper, umh_complete(). Currently it simply does complete(sub_info->complete). Signed-off-by: Oleg Nesterov Cc: Tetsuo Handa Cc: Rusty Russell Cc: Tejun Heo Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Ben Hutchings --- diff --git a/kernel/kmod.c b/kernel/kmod.c index a4bea97c75b66..e5e30b6170734 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c @@ -197,6 +197,11 @@ void call_usermodehelper_freeinfo(struct subprocess_info *info) } 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. */ static int wait_for_helper(void *data) { @@ -233,7 +238,7 @@ static int wait_for_helper(void *data) sub_info->retval = ret; } - complete(sub_info->complete); + umh_complete(sub_info); return 0; } @@ -267,7 +272,7 @@ static void __call_usermodehelper(struct work_struct *work) case UMH_WAIT_EXEC: if (pid < 0) sub_info->retval = pid; - complete(sub_info->complete); + umh_complete(sub_info); } }