mm: use limited read-ahead to satisfy read
[linux-block.git] / mm / z3fold.c
index 460b0feced26abe6d3b2cc16305fbf1c44635190..18feaa0bc5377395b5788c43fa821621d08bd62f 100644 (file)
@@ -212,13 +212,12 @@ static inline struct z3fold_buddy_slots *alloc_slots(struct z3fold_pool *pool,
 {
        struct z3fold_buddy_slots *slots;
 
-       slots = kmem_cache_alloc(pool->c_handle,
+       slots = kmem_cache_zalloc(pool->c_handle,
                                 (gfp & ~(__GFP_HIGHMEM | __GFP_MOVABLE)));
 
        if (slots) {
                /* It will be freed separately in free_handle(). */
                kmemleak_not_leak(slots);
-               memset(slots->slot, 0, sizeof(slots->slot));
                slots->pool = (unsigned long)pool;
                rwlock_init(&slots->lock);
        }