/* Don't touch any member of the md after calling this function because the md may be freed in dm_put() at the end of this function. Or do dm_get() before calling this function and dm_put() later.  */
static void rq_completed(struct mapped_device *md, int rw, int run_queue)
/* Don't touch any member of the md after calling this function because the md may be freed in dm_put() at the end of this function. Or do dm_get() before calling this function and dm_put() later.  */
static void rq_completed(struct mapped_device *md, int rw, int run_queue)
{
	atomic_dec(&md->pending[rw]);
	if (!md_in_flight(md))
		wake_up(&md->wait);
	if (run_queue)
		blk_run_queue(md->queue);
	dm_put(md);
}