Commit | Line | Data |
---|---|---|
024b7d6a | 1 | // SPDX-License-Identifier: LGPL-2.1 |
022cae36 VJJ |
2 | /* |
3 | * Copyright IBM Corporation, 2010 | |
4 | * Author Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> | |
022cae36 VJJ |
5 | */ |
6 | ||
dcdbd7b2 | 7 | #include <linux/mm.h> |
022cae36 | 8 | #include <linux/module.h> |
52ad259e | 9 | #include "trans_common.h" |
022cae36 VJJ |
10 | |
11 | /** | |
760b3d61 AL |
12 | * p9_release_pages - Release pages after the transaction. |
13 | * @pages: array of pages to be put | |
14 | * @nr_pages: size of array | |
022cae36 | 15 | */ |
abfa034e | 16 | void p9_release_pages(struct page **pages, int nr_pages) |
022cae36 | 17 | { |
110ecd69 SL |
18 | int i; |
19 | ||
20 | for (i = 0; i < nr_pages; i++) | |
21 | if (pages[i]) | |
22 | put_page(pages[i]); | |
022cae36 | 23 | } |
abfa034e | 24 | EXPORT_SYMBOL(p9_release_pages); |