提交 df12ee99 编写于 作者: A Alasdair G Kergon

dm: rearrange dm_wq_work

Refactor dm_wq_work() to make later patch more readable.
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 692d0eb9
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册