treewide: use kv[mz]alloc* rather than opencoded variants
[linux-2.6-microblaze.git] / mm / frame_vector.c
index db77dcb..72ebec1 100644 (file)
@@ -200,10 +200,7 @@ struct frame_vector *frame_vector_create(unsigned int nr_frames)
         * Avoid higher order allocations, use vmalloc instead. It should
         * be rare anyway.
         */
-       if (size <= PAGE_SIZE)
-               vec = kmalloc(size, GFP_KERNEL);
-       else
-               vec = vmalloc(size);
+       vec = kvmalloc(size, GFP_KERNEL);
        if (!vec)
                return NULL;
        vec->nr_allocated = nr_frames;