/* Initialise the state of a blockdev page's buffers.  */
static void init_page_buffers(struct page *page, struct block_device *bdev, sector_t block, int size)
/* Initialise the state of a blockdev page's buffers.  */
static void init_page_buffers(struct page *page, struct block_device *bdev, sector_t block, int size)
{
	struct buffer_head *head = page_buffers(page);
	struct buffer_head *bh = head;
	int uptodate = PageUptodate(page);
	do {
		if (!buffer_mapped(bh)) {
			init_buffer(bh, NULL, NULL);
			bh->b_bdev = bdev;
			bh->b_blocknr = block;
			if (uptodate)
				set_buffer_uptodate(bh);
			set_buffer_mapped(bh);
		}
		block++;
		bh = bh->b_this_page;
	} while (bh != head);
}