Venkateswararao Jujjuri (JV) | 022cae36 | 2011-01-28 14:11:13 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright IBM Corporation, 2010 |
| 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 | * |
| 13 | */ |
| 14 | |
Al Viro | dcdbd7b | 2015-04-02 23:11:36 -0400 | [diff] [blame] | 15 | #include <linux/mm.h> |
Venkateswararao Jujjuri (JV) | 022cae36 | 2011-01-28 14:11:13 -0800 | [diff] [blame] | 16 | #include <linux/module.h> |
Adeodato Simó | cfbe930 | 2018-11-13 03:28:53 -0300 | [diff] [blame] | 17 | #include "trans_common.h" |
Venkateswararao Jujjuri (JV) | 022cae36 | 2011-01-28 14:11:13 -0800 | [diff] [blame] | 18 | |
| 19 | /** |
Sun Lianwen | 4a026da | 2018-05-08 09:49:38 +0800 | [diff] [blame] | 20 | * p9_release_pages - Release pages after the transaction. |
Venkateswararao Jujjuri (JV) | 022cae36 | 2011-01-28 14:11:13 -0800 | [diff] [blame] | 21 | */ |
Aneesh Kumar K.V | abfa034 | 2011-08-16 10:50:10 +0530 | [diff] [blame] | 22 | void p9_release_pages(struct page **pages, int nr_pages) |
Venkateswararao Jujjuri (JV) | 022cae36 | 2011-01-28 14:11:13 -0800 | [diff] [blame] | 23 | { |
Sasha Levin | 110ecd6 | 2013-07-11 13:16:54 -0400 | [diff] [blame] | 24 | int i; |
| 25 | |
| 26 | for (i = 0; i < nr_pages; i++) |
| 27 | if (pages[i]) |
| 28 | put_page(pages[i]); |
Venkateswararao Jujjuri (JV) | 022cae36 | 2011-01-28 14:11:13 -0800 | [diff] [blame] | 29 | } |
Aneesh Kumar K.V | abfa034 | 2011-08-16 10:50:10 +0530 | [diff] [blame] | 30 | EXPORT_SYMBOL(p9_release_pages); |