[Intel-gfx] [PATCH v2 22/34] orangefs: convert put_page() to put_user_page*()
john.hubbard at gmail.com
john.hubbard at gmail.com
Sun Aug 4 22:49:03 UTC 2019
From: John Hubbard <jhubbard at nvidia.com>
For pages that were retained via get_user_pages*(), release those pages
via the new put_user_page*() routines, instead of via put_page() or
release_pages().
This is part a tree-wide conversion, as described in commit fc1d8e7cca2d
("mm: introduce put_user_page*(), placeholder versions").
Cc: Mike Marshall <hubcap at omnibond.com>
Cc: Martin Brandenburg <martin at omnibond.com>
Cc: devel at lists.orangefs.org
Signed-off-by: John Hubbard <jhubbard at nvidia.com>
---
fs/orangefs/orangefs-bufmap.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c
index 2bb916d68576..f2f33a16d604 100644
--- a/fs/orangefs/orangefs-bufmap.c
+++ b/fs/orangefs/orangefs-bufmap.c
@@ -168,10 +168,7 @@ static DEFINE_SPINLOCK(orangefs_bufmap_lock);
static void
orangefs_bufmap_unmap(struct orangefs_bufmap *bufmap)
{
- int i;
-
- for (i = 0; i < bufmap->page_count; i++)
- put_page(bufmap->page_array[i]);
+ put_user_pages(bufmap->page_array, bufmap->page_count);
}
static void
@@ -280,7 +277,7 @@ orangefs_bufmap_map(struct orangefs_bufmap *bufmap,
for (i = 0; i < ret; i++) {
SetPageError(bufmap->page_array[i]);
- put_page(bufmap->page_array[i]);
+ put_user_page(bufmap->page_array[i]);
}
return -ENOMEM;
}
--
2.22.0
More information about the Intel-gfx
mailing list