diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-10 10:26:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-10 10:26:27 -0400 |
commit | ff3cb3fec3c5bbb5110e652bbdd410bc99a47e9f (patch) | |
tree | 5b6834a3a4ecd479d544f8cc8cd10811c1ae13e1 /mm | |
parent | 6ccaa3172941c0a97c7f1c5155b1d32ecd27ec2f (diff) | |
parent | be14eb619108fa8b7120eb2c42d66d5f623ae10e (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: Range check cpu in blk_cpu_to_group
scatterlist: prevent invalid free when alloc fails
writeback: Fix lost wake-up shutting down writeback thread
writeback: do not lose wakeup events when forking bdi threads
cciss: fix reporting of max queue depth since init
block: switch s390 tape_block and mg_disk to elevator_change()
block: add function call to switch the IO scheduler from a driver
fs/bio-integrity.c: return -ENOMEM on kmalloc failure
bio-integrity.c: remove dependency on __GFP_NOFAIL
BLOCK: fix bio.bi_rw handling
block: put dev->kobj in blk_register_queue fail path
cciss: handle allocation failure
cfq-iosched: Documentation help for new tunables
cfq-iosched: blktrace print per slice sector stats
cfq-iosched: Implement tunable group_idle
cfq-iosched: Do group share accounting in IOPS when slice_idle=0
cfq-iosched: Do not idle if slice_idle=0
cciss: disable doorbell reset on reset_devices
blkio: Fix return code for mkdir calls
Diffstat (limited to 'mm')
-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 | ||