diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-12 20:02:18 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-12 20:02:18 -0400 |
commit | 9277bf4b4f94655eef177d0daffa90a47c51eb62 (patch) | |
tree | 569b5a13b3f7030a603460d8d9ded035a6f7f48f /mm/backing-dev.c | |
parent | 897493504addc5609f04a2c4f73c37ab972c29b2 (diff) | |
parent | 49553c2ef88749dd502687f4eb9c258bb10a4f44 (diff) |
Merge remote branch 'linus' into drm-intel-fixes
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 | ||