/* gfs2_jdata_writepages - Write a bunch of dirty pages back to disk @mapping: The mapping to write @wbc: The writeback control  */
static int gfs2_jdata_writepages(struct address_space *mapping, struct writeback_control *wbc)
/* gfs2_jdata_writepages - Write a bunch of dirty pages back to disk @mapping: The mapping to write @wbc: The writeback control  */
static int gfs2_jdata_writepages(struct address_space *mapping, struct writeback_control *wbc)
{
	struct gfs2_inode *ip = GFS2_I(mapping->host);
	struct gfs2_sbd *sdp = GFS2_SB(mapping->host);
	int ret;
	ret = gfs2_write_cache_jdata(mapping, wbc);
	if (ret == 0 && wbc->sync_mode == WB_SYNC_ALL) {
		gfs2_log_flush(sdp, ip->i_gl);
		ret = gfs2_write_cache_jdata(mapping, wbc);
	}
	return ret;
}