aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-23 18:02:47 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-04-05 11:17:13 -0400
commit20cf2e1d3b45a810ec5e52f6c2684a413dfc9394 (patch)
tree6605170794588f5525a73a6c5f7849a27d300f0a /kernel
parent28a526d58e5adb701571c6be13bc0276665ec4c7 (diff)
usermodehelper: introduce umh_complete(sub_info)
BugLink: http://bugs.launchpad.net/bugs/963685 Preparation. Add the new trivial helper, umh_complete(). Currently it simply does complete(sub_info->complete). 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> (cherry picked from commit b3449922502f5a161ee2b5022a33aec8472fbf18) Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kmod.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index fabfe541b1d..4c3fa8fbc34 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -197,6 +197,11 @@ void call_usermodehelper_freeinfo(struct subprocess_info *info)
197} 197}
198EXPORT_SYMBOL(call_usermodehelper_freeinfo); 198EXPORT_SYMBOL(call_usermodehelper_freeinfo);
199 199
200static void umh_complete(struct subprocess_info *sub_info)
201{
202 complete(sub_info->complete);
203}
204
200/* Keventd can't block, but this (a child) can. */ 205/* Keventd can't block, but this (a child) can. */
201static int wait_for_helper(void *data) 206static int wait_for_helper(void *data)
202{ 207{
@@ -233,7 +238,7 @@ static int wait_for_helper(void *data)
233 sub_info->retval = ret; 238 sub_info->retval = ret;
234 } 239 }
235 240
236 complete(sub_info->complete); 241 umh_complete(sub_info);
237 return 0; 242 return 0;
238} 243}
239 244
@@ -267,7 +272,7 @@ static void __call_usermodehelper(struct work_struct *work)
267 case UMH_WAIT_EXEC: 272 case UMH_WAIT_EXEC:
268 if (pid < 0) 273 if (pid < 0)
269 sub_info->retval = pid; 274 sub_info->retval = pid;
270 complete(sub_info->complete); 275 umh_complete(sub_info);
271 } 276 }
272} 277}
273 278