/* Called when truncating a buffer on a page completely.  */
static void discard_buffer(struct buffer_head *bh)
/* Called when truncating a buffer on a page completely.  */
static void discard_buffer(struct buffer_head *bh)
{
	lock_buffer(bh);
	clear_buffer_dirty(bh);
	bh->b_bdev = NULL;
	clear_buffer_mapped(bh);
	clear_buffer_req(bh);
	clear_buffer_new(bh);
	clear_buffer_delay(bh);
	clear_buffer_unwritten(bh);
	unlock_buffer(bh);
}