diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-09-15 04:27:31 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-09-15 04:27:31 -0400 |
commit | 3aabae7d9dfaed60effe93662f02c19bafc18537 (patch) | |
tree | af94cdd69add07601d9f3f5988dfc1dc255e3886 /mm/backing-dev.c | |
parent | 79e406d7b00ab2b261ae32a59f266fd3b7af6f29 (diff) | |
parent | 57c072c7113f54f9512624d6c665db6184448782 (diff) |
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r-- | mm/backing-dev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index eaa4a5bbe063..c2bf86f470ed 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -445,8 +445,8 @@ static int bdi_forker_thread(void *ptr) | |||
445 | switch (action) { | 445 | switch (action) { |
446 | case FORK_THREAD: | 446 | case FORK_THREAD: |
447 | __set_current_state(TASK_RUNNING); | 447 | __set_current_state(TASK_RUNNING); |
448 | task = kthread_run(bdi_writeback_thread, &bdi->wb, "flush-%s", | 448 | task = kthread_create(bdi_writeback_thread, &bdi->wb, |
449 | dev_name(bdi->dev)); | 449 | "flush-%s", dev_name(bdi->dev)); |
450 | if (IS_ERR(task)) { | 450 | if (IS_ERR(task)) { |
451 | /* | 451 | /* |
452 | * If thread creation fails, force writeout of | 452 | * If thread creation fails, force writeout of |
@@ -457,10 +457,13 @@ static int bdi_forker_thread(void *ptr) | |||
457 | /* | 457 | /* |
458 | * The spinlock makes sure we do not lose | 458 | * The spinlock makes sure we do not lose |
459 | * wake-ups when racing with 'bdi_queue_work()'. | 459 | * wake-ups when racing with 'bdi_queue_work()'. |
460 | * And as soon as the bdi thread is visible, we | ||
461 | * can start it. | ||
460 | */ | 462 | */ |
461 | spin_lock_bh(&bdi->wb_lock); | 463 | spin_lock_bh(&bdi->wb_lock); |
462 | bdi->wb.task = task; | 464 | bdi->wb.task = task; |
463 | spin_unlock_bh(&bdi->wb_lock); | 465 | spin_unlock_bh(&bdi->wb_lock); |
466 | wake_up_process(task); | ||
464 | } | 467 | } |
465 | break; | 468 | break; |
466 | 469 | ||