mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
libceph: use alloc_page() in ceph_alloc_page_vector()
ceph_alloc_page_vector() allocates its pages with __page_cache_alloc(). However, the pages are never inserted into an address_space and do not need the cpuset memory spread policy __page_cache_alloc() provides. Use alloc_page() instead. Assisted-by: Cursor Signed-off-by: Tal Zussman <tz2294@columbia.edu> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
6c82bff856
commit
f97509aff5
|
|
@ -32,7 +32,7 @@ struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags)
|
|||
if (!pages)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
for (i = 0; i < num_pages; i++) {
|
||||
pages[i] = __page_cache_alloc(flags);
|
||||
pages[i] = alloc_page(flags);
|
||||
if (pages[i] == NULL) {
|
||||
ceph_release_page_vector(pages, i);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user