]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/swap_state.c
x86/events/intel/ds: Fix bts_interrupt_threshold alignment
[linux.git] / mm / swap_state.c
index ab8e59cd18ea09df428b3eb6b19e58eb7592564c..ecee9c6c4cc1725028fd723452f3655c0799a8a7 100644 (file)
@@ -620,7 +620,7 @@ int init_swap_address_space(unsigned int type, unsigned long nr_pages)
        unsigned int i, nr;
 
        nr = DIV_ROUND_UP(nr_pages, SWAP_ADDRESS_SPACE_PAGES);
-       spaces = kvzalloc(sizeof(struct address_space) * nr, GFP_KERNEL);
+       spaces = kvcalloc(nr, sizeof(struct address_space), GFP_KERNEL);
        if (!spaces)
                return -ENOMEM;
        for (i = 0; i < nr; i++) {