1 // SPDX-License-Identifier: LGPL-2.1 << 2 /* 1 /* 3 * Copyright IBM Corporation, 2010 2 * Copyright IBM Corporation, 2010 4 * Author Venkateswararao Jujjuri <jvrao@linux 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 * 5 */ 13 */ 6 14 7 #include <linux/mm.h> 15 #include <linux/mm.h> 8 #include <linux/module.h> 16 #include <linux/module.h> 9 #include "trans_common.h" 17 #include "trans_common.h" 10 18 11 /** 19 /** 12 * p9_release_pages - Release pages after the 20 * p9_release_pages - Release pages after the transaction. 13 * @pages: array of pages to be put 21 * @pages: array of pages to be put 14 * @nr_pages: size of array 22 * @nr_pages: size of array 15 */ 23 */ 16 void p9_release_pages(struct page **pages, int 24 void p9_release_pages(struct page **pages, int nr_pages) 17 { 25 { 18 int i; 26 int i; 19 27 20 for (i = 0; i < nr_pages; i++) 28 for (i = 0; i < nr_pages; i++) 21 if (pages[i]) 29 if (pages[i]) 22 put_page(pages[i]); 30 put_page(pages[i]); 23 } 31 } 24 EXPORT_SYMBOL(p9_release_pages); 32 EXPORT_SYMBOL(p9_release_pages); 25 33
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.