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