Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.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++) {