提交 ef208587 编写于 作者: M Mikulas Patocka 提交者: Alasdair G Kergon

dm: merge __flush_deferred_io into caller

Merge __flush_deferred_io() into the only caller, dm_wq_work().

There's no need to have a function that has only one caller.
Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 f0b9a450
......@@ -1401,14 +1401,20 @@ static int dm_wait_for_completion(struct mapped_device *md)
/*
* Process the deferred bios
*/
static void __flush_deferred_io(struct mapped_device *md)
static void dm_wq_work(struct work_struct *work)
{
struct mapped_device *md = container_of(work, struct mapped_device,
work);
struct bio *c;
down_write(&md->io_lock);
while ((c = bio_list_pop(&md->deferred)))
__split_and_process_bio(md, c);
clear_bit(DMF_BLOCK_IO, &md->flags);
up_write(&md->io_lock);
}
static void __merge_pushback_list(struct mapped_device *md)
......@@ -1422,16 +1428,6 @@ static void __merge_pushback_list(struct mapped_device *md)
spin_unlock_irqrestore(&md->pushback_lock, flags);
}
static void dm_wq_work(struct work_struct *work)
{
struct mapped_device *md = container_of(work, struct mapped_device,
work);
down_write(&md->io_lock);
__flush_deferred_io(md);
up_write(&md->io_lock);
}
static void dm_queue_flush(struct mapped_device *md)
{
queue_work(md->wq, &md->work);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册