/* relay_destroy_buf - destroy an rchan_buf struct and associated buffer @buf: the buffer struct  */
static void relay_destroy_buf(struct rchan_buf *buf)
/* relay_destroy_buf - destroy an rchan_buf struct and associated buffer @buf: the buffer struct  */
static void relay_destroy_buf(struct rchan_buf *buf)
{
	struct rchan *chan = buf->chan;
	unsigned int i;
	if (likely(buf->start)) {
		vunmap(buf->start);
		for (i = 0; i < buf->page_count; i++)
			__free_page(buf->page_array[i]);
		relay_free_page_array(buf->page_array);
	}
	chan->buf[buf->cpu] = NULL;
	kfree(buf->padding);
	kfree(buf);
	kref_put(&chan->kref, relay_destroy_channel);
}