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