]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - mm/swapfile.c
mm: do not call frontswap_init() during swapoff
[~shefty/rdma-dev.git] / mm / swapfile.c
index 27a52b731576366ff61d00b1c81a3449cd0612e1..0fbb45283c6641cf1bdb8b5a39b4c9eb414f61f7 100644 (file)
@@ -1471,7 +1471,6 @@ static void _enable_swap_info(struct swap_info_struct *p, int prio,
                swap_list.head = swap_list.next = p->type;
        else
                swap_info[prev]->next = p->type;
-       frontswap_init(p->type);
 }
 
 static void enable_swap_info(struct swap_info_struct *p, int prio,
@@ -1480,6 +1479,7 @@ static void enable_swap_info(struct swap_info_struct *p, int prio,
 {
        spin_lock(&swap_lock);
        _enable_swap_info(p, prio, swap_map, frontswap_map);
+       frontswap_init(p->type);
        spin_unlock(&swap_lock);
 }