aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2012-03-23 18:02:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:41 -0400
commitb3449922502f5a161ee2b5022a33aec8472fbf18 (patch)
tree4fc28a0b52e61af3fdb47f3ae0770e112a92dfbc /kernel
parent70834d3070c3f3015ab5c05176d54bd4a0100546 (diff)
usermodehelper: introduce umh_complete(sub_info)
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>
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 a0a88543934..8ea25944ce3 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -199,6 +199,11 @@ void call_usermodehelper_freeinfo(struct subprocess_info *info)
199} 199}
200EXPORT_SYMBOL(call_usermodehelper_freeinfo); 200EXPORT_SYMBOL(call_usermodehelper_freeinfo);
201 201
202static void umh_complete(struct subprocess_info *sub_info)
203{
204 complete(sub_info->complete);
205}
206
202/* Keventd can't block, but this (a child) can. */ 207/* Keventd can't block, but this (a child) can. */
203static int wait_for_helper(void *data) 208static int wait_for_helper(void *data)
204{ 209{
@@ -235,7 +240,7 @@ static int wait_for_helper(void *data)
235 sub_info->retval = ret; 240 sub_info->retval = ret;
236 } 241 }
237 242
238 complete(sub_info->complete); 243 umh_complete(sub_info);
239 return 0; 244 return 0;
240} 245}
241 246
@@ -269,7 +274,7 @@ static void __call_usermodehelper(struct work_struct *work)
269 case UMH_WAIT_EXEC: 274 case UMH_WAIT_EXEC:
270 if (pid < 0) 275 if (pid < 0)
271 sub_info->retval = pid; 276 sub_info->retval = pid;
272 complete(sub_info->complete); 277 umh_complete(sub_info);
273 } 278 }
274} 279}
275 280