trans_common.c 521 B

123456789101112131415161718192021222324
  1. // SPDX-License-Identifier: LGPL-2.1
  2. /*
  3. * Copyright IBM Corporation, 2010
  4. * Author Venkateswararao Jujjuri <[email protected]>
  5. */
  6. #include <linux/mm.h>
  7. #include <linux/module.h>
  8. #include "trans_common.h"
  9. /**
  10. * p9_release_pages - Release pages after the transaction.
  11. * @pages: array of pages to be put
  12. * @nr_pages: size of array
  13. */
  14. void p9_release_pages(struct page **pages, int nr_pages)
  15. {
  16. int i;
  17. for (i = 0; i < nr_pages; i++)
  18. if (pages[i])
  19. put_page(pages[i]);
  20. }
  21. EXPORT_SYMBOL(p9_release_pages);