blob: 38aa6345bdfa2ec9fc52155e5b0eb3b369fdf463 [file] [log] [blame]
Venkateswararao Jujjuri (JV)022cae362011-01-28 14:11:13 -08001/*
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 Virodcdbd7b2015-04-02 23:11:36 -040015#include <linux/mm.h>
Venkateswararao Jujjuri (JV)022cae362011-01-28 14:11:13 -080016#include <linux/module.h>
Venkateswararao Jujjuri (JV)022cae362011-01-28 14:11:13 -080017
18/**
19 * p9_release_req_pages - Release pages after the transaction.
Venkateswararao Jujjuri (JV)022cae362011-01-28 14:11:13 -080020 */
Aneesh Kumar K.Vabfa0342011-08-16 10:50:10 +053021void p9_release_pages(struct page **pages, int nr_pages)
Venkateswararao Jujjuri (JV)022cae362011-01-28 14:11:13 -080022{
Sasha Levin110ecd62013-07-11 13:16:54 -040023 int i;
24
25 for (i = 0; i < nr_pages; i++)
26 if (pages[i])
27 put_page(pages[i]);
Venkateswararao Jujjuri (JV)022cae362011-01-28 14:11:13 -080028}
Aneesh Kumar K.Vabfa0342011-08-16 10:50:10 +053029EXPORT_SYMBOL(p9_release_pages);