18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright IBM Corporation, 2010 38c2ecf20Sopenharmony_ci * Author Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify it 68c2ecf20Sopenharmony_ci * under the terms of version 2.1 of the GNU Lesser General Public License 78c2ecf20Sopenharmony_ci * as published by the Free Software Foundation. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * This program is distributed in the hope that it would be useful, but 108c2ecf20Sopenharmony_ci * WITHOUT ANY WARRANTY; without even the implied warranty of 118c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <linux/mm.h> 168c2ecf20Sopenharmony_ci#include <linux/module.h> 178c2ecf20Sopenharmony_ci#include "trans_common.h" 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/** 208c2ecf20Sopenharmony_ci * p9_release_pages - Release pages after the transaction. 218c2ecf20Sopenharmony_ci */ 228c2ecf20Sopenharmony_civoid p9_release_pages(struct page **pages, int nr_pages) 238c2ecf20Sopenharmony_ci{ 248c2ecf20Sopenharmony_ci int i; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci for (i = 0; i < nr_pages; i++) 278c2ecf20Sopenharmony_ci if (pages[i]) 288c2ecf20Sopenharmony_ci put_page(pages[i]); 298c2ecf20Sopenharmony_ci} 308c2ecf20Sopenharmony_ciEXPORT_SYMBOL(p9_release_pages); 31