Linux Audio

Check our new training course

Loading...
v5.14.15
 1/*
 2 * Copyright IBM Corporation, 2010
 3 * Author Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
 4 *
 5 * This program is free software; you can redistribute it and/or modify it
 6 * under the terms of version 2.1 of the GNU Lesser General Public License
 7 * as published by the Free Software Foundation.
 8 *
 9 * This program is distributed in the hope that it would be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 */
14
15#include <linux/mm.h>
16#include <linux/module.h>
17#include "trans_common.h"
18
19/**
20 * p9_release_pages - Release pages after the transaction.
21 * @pages: array of pages to be put
22 * @nr_pages: size of array
23 */
24void p9_release_pages(struct page **pages, int nr_pages)
25{
26	int i;
27
28	for (i = 0; i < nr_pages; i++)
29		if (pages[i])
30			put_page(pages[i]);
31}
32EXPORT_SYMBOL(p9_release_pages);
v4.6
 1/*
 2 * Copyright IBM Corporation, 2010
 3 * Author Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
 4 *
 5 * This program is free software; you can redistribute it and/or modify it
 6 * under the terms of version 2.1 of the GNU Lesser General Public License
 7 * as published by the Free Software Foundation.
 8 *
 9 * This program is distributed in the hope that it would be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 *
13 */
14
15#include <linux/mm.h>
16#include <linux/module.h>
 
17
18/**
19 *  p9_release_req_pages - Release pages after the transaction.
 
 
20 */
21void p9_release_pages(struct page **pages, int nr_pages)
22{
23	int i;
24
25	for (i = 0; i < nr_pages; i++)
26		if (pages[i])
27			put_page(pages[i]);
28}
29EXPORT_SYMBOL(p9_release_pages);