mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
dm: rearrange dm_wq_work
Refactor dm_wq_work() to make later patch more readable. Signed-off-by: Alasdair G Kergon <[email protected]>
This commit is contained in:
parent
692d0eb9e0
commit
df12ee9963
1 changed files with 9 additions and 8 deletions
|
|
@ -1437,18 +1437,19 @@ static void dm_wq_work(struct work_struct *work)
|
|||
|
||||
down_write(&md->io_lock);
|
||||
|
||||
next_bio:
|
||||
spin_lock_irq(&md->deferred_lock);
|
||||
c = bio_list_pop(&md->deferred);
|
||||
spin_unlock_irq(&md->deferred_lock);
|
||||
while (1) {
|
||||
spin_lock_irq(&md->deferred_lock);
|
||||
c = bio_list_pop(&md->deferred);
|
||||
spin_unlock_irq(&md->deferred_lock);
|
||||
|
||||
if (!c) {
|
||||
clear_bit(DMF_BLOCK_IO, &md->flags);
|
||||
break;
|
||||
}
|
||||
|
||||
if (c) {
|
||||
__split_and_process_bio(md, c);
|
||||
goto next_bio;
|
||||
}
|
||||
|
||||
clear_bit(DMF_BLOCK_IO, &md->flags);
|
||||
|
||||
up_write(&md->io_lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue