trans_common.c 797 B

1234567891011121314151617181920212223242526272829
  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. #include <linux/mm.h>
  15. #include <linux/module.h>
  16. /**
  17. * p9_release_req_pages - Release pages after the transaction.
  18. */
  19. void p9_release_pages(struct page **pages, int nr_pages)
  20. {
  21. int i;
  22. for (i = 0; i < nr_pages; i++)
  23. if (pages[i])
  24. put_page(pages[i]);
  25. }
  26. EXPORT_SYMBOL(p9_release_pages);