Commit df12ee99 authored by Alasdair G Kergon's avatar Alasdair G Kergon

dm: rearrange dm_wq_work

Refactor dm_wq_work() to make later patch more readable.
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 692d0eb9
...@@ -1437,17 +1437,18 @@ static void dm_wq_work(struct work_struct *work) ...@@ -1437,17 +1437,18 @@ static void dm_wq_work(struct work_struct *work)
down_write(&md->io_lock); down_write(&md->io_lock);
next_bio: while (1) {
spin_lock_irq(&md->deferred_lock); spin_lock_irq(&md->deferred_lock);
c = bio_list_pop(&md->deferred); c = bio_list_pop(&md->deferred);
spin_unlock_irq(&md->deferred_lock); spin_unlock_irq(&md->deferred_lock);
if (c) { if (!c) {
__split_and_process_bio(md, c); clear_bit(DMF_BLOCK_IO, &md->flags);
goto next_bio; break;
} }
clear_bit(DMF_BLOCK_IO, &md->flags); __split_and_process_bio(md, c);
}
up_write(&md->io_lock); up_write(&md->io_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment