/* nilfs_forget_buffer - discard dirty state @inode: owner inode of the buffer @bh: buffer head of the buffer to be discarded  */
void nilfs_forget_buffer(struct buffer_head *bh)
/* nilfs_forget_buffer - discard dirty state @inode: owner inode of the buffer @bh: buffer head of the buffer to be discarded  */
void nilfs_forget_buffer(struct buffer_head *bh)
{
	struct page *page = bh->b_page;
	lock_buffer(bh);
	clear_buffer_nilfs_volatile(bh);
	clear_buffer_dirty(bh);
	if (nilfs_page_buffers_clean(page))
		__nilfs_clear_page_dirty(page);
	clear_buffer_uptodate(bh);
	clear_buffer_mapped(bh);
	bh->b_blocknr = -1;
	ClearPageUptodate(page);
	ClearPageMappedToDisk(page);
	unlock_buffer(bh);
	brelse(bh);
}