/* Remove bdi from the global list and shutdown any threads we have running  */
static void bdi_wb_shutdown(struct backing_dev_info *bdi)
/* Remove bdi from the global list and shutdown any threads we have running  */
static void bdi_wb_shutdown(struct backing_dev_info *bdi)
{
	struct bdi_writeback *wb;
	if (!bdi_cap_writeback_dirty(bdi))
		return;
	wait_on_bit(&bdi->state, BDI_pending, bdi_sched_wait,
			TASK_UNINTERRUPTIBLE);
	bdi_remove_from_list(bdi);
	list_for_each_entry(wb, &bdi->wb_list, list) {
		thaw_process(wb->task);
		kthread_stop(wb->task);
	}
}