]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/swap_slots.c
x86/events/intel/ds: Fix bts_interrupt_threshold alignment
[linux.git] / mm / swap_slots.c
index f51ac051c0c9ede270c925081ba4be6428f9fe4b..a791411fed71663af9839f8c2a4cfaba42ddedca 100644 (file)
@@ -122,12 +122,12 @@ static int alloc_swap_slot_cache(unsigned int cpu)
         * as kvzalloc could trigger reclaim and get_swap_page,
         * which can lock swap_slots_cache_mutex.
         */
-       slots = kvzalloc(sizeof(swp_entry_t) * SWAP_SLOTS_CACHE_SIZE,
+       slots = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t),
                         GFP_KERNEL);
        if (!slots)
                return -ENOMEM;
 
-       slots_ret = kvzalloc(sizeof(swp_entry_t) * SWAP_SLOTS_CACHE_SIZE,
+       slots_ret = kvcalloc(SWAP_SLOTS_CACHE_SIZE, sizeof(swp_entry_t),
                             GFP_KERNEL);
        if (!slots_ret) {
                kvfree(slots);