/* Description: This does WB_SYNC_ALL data integrity writeback and waits for the IO to complete. Callers must hold the sb s_umount semaphore for reading, to avoid having the super disappear before we are done.  */
static void bdi_sync_writeback(struct backing_dev_info *bdi, struct super_block *sb)
/* Description: This does WB_SYNC_ALL data integrity writeback and waits for the IO to complete. Callers must hold the sb s_umount semaphore for reading, to avoid having the super disappear before we are done.  */
static void bdi_sync_writeback(struct backing_dev_info *bdi, struct super_block *sb)
{
	struct wb_writeback_args args = {
		.sb		= sb,
		.sync_mode	= WB_SYNC_ALL,
		.nr_pages	= LONG_MAX,
		.range_cyclic	= 0,
	};
	struct bdi_work work;
	bdi_work_init(&work, &args);
	work.state |= WS_ONSTACK;
	bdi_queue_work(bdi, &work);
	bdi_wait_on_work_clear(&work);
}