blk-throttle: simpfy low limit reached check in throtl_tg_can_upgrade
[linux-2.6-microblaze.git] / kernel / relay.c
index 6a611e7..d7edc93 100644 (file)
@@ -60,10 +60,7 @@ static const struct vm_operations_struct relay_file_mmap_ops = {
  */
 static struct page **relay_alloc_page_array(unsigned int n_pages)
 {
-       const size_t pa_size = n_pages * sizeof(struct page *);
-       if (pa_size > PAGE_SIZE)
-               return vzalloc(pa_size);
-       return kzalloc(pa_size, GFP_KERNEL);
+       return kvcalloc(n_pages, sizeof(struct page *), GFP_KERNEL);
 }
 
 /*