/* Only called when we have a failure during allocating write to write zero's to the newly allocated region.  */
static void ocfs2_write_failure(struct inode *inode, struct ocfs2_write_ctxt *wc, loff_t user_pos, unsigned user_len)
/* Only called when we have a failure during allocating write to write zero's to the newly allocated region.  */
static void ocfs2_write_failure(struct inode *inode, struct ocfs2_write_ctxt *wc, loff_t user_pos, unsigned user_len)
{
	int i;
	unsigned from = user_pos & (PAGE_CACHE_SIZE - 1),
		to = user_pos + user_len;
	struct page *tmppage;
	ocfs2_zero_new_buffers(wc->w_target_page, from, to);
	for(i = 0; i < wc->w_num_pages; i++) {
		tmppage = wc->w_pages[i];
		if (page_has_buffers(tmppage)) {
			if (ocfs2_should_order_data(inode))
				ocfs2_jbd2_file_inode(wc->w_handle, inode);
			block_commit_write(tmppage, from, to);
		}
	}
}