/* Description: This function attempts to steal the &struct page attached to @buf. If successful, this function returns 0 and returns with the page locked. The caller may then reuse the page for whatever he wishes; the typical use is insertion into a different file page cache.  */
int generic_pipe_buf_steal(struct pipe_inode_info *pipe, struct pipe_buffer *buf)
/* Description: This function attempts to steal the &struct page attached to @buf. If successful, this function returns 0 and returns with the page locked. The caller may then reuse the page for whatever he wishes; the typical use is insertion into a different file page cache.  */
int generic_pipe_buf_steal(struct pipe_inode_info *pipe, struct pipe_buffer *buf)
{
	struct page *page = buf->page;
	if (page_count(page) == 1) {
		lock_page(page);
		return 0;
	}
	return 1;
}