macvtap: fix uninitialized access on TUNSETIFF
[cascardo/linux.git] / mm / memory-failure.c
index e5ee0ca..feb803b 100644 (file)
@@ -239,19 +239,14 @@ void shake_page(struct page *p, int access)
        }
 
        /*
-        * Only call shrink_slab here (which would also shrink other caches) if
-        * access is not potentially fatal.
+        * Only call shrink_node_slabs here (which would also shrink
+        * other caches) if access is not potentially fatal.
         */
        if (access) {
                int nr;
                int nid = page_to_nid(p);
                do {
-                       struct shrink_control shrink = {
-                               .gfp_mask = GFP_KERNEL,
-                       };
-                       node_set(nid, shrink.nodes_to_scan);
-
-                       nr = shrink_slab(&shrink, 1000, 1000);
+                       nr = shrink_node_slabs(GFP_KERNEL, nid, 1000, 1000);
                        if (page_count(p) == 1)
                                break;
                } while (nr > 10);
@@ -466,7 +461,7 @@ static void collect_procs_file(struct page *page, struct list_head *to_kill,
        struct task_struct *tsk;
        struct address_space *mapping = page->mapping;
 
-       mutex_lock(&mapping->i_mmap_mutex);
+       i_mmap_lock_read(mapping);
        read_lock(&tasklist_lock);
        for_each_process(tsk) {
                pgoff_t pgoff = page_to_pgoff(page);
@@ -488,7 +483,7 @@ static void collect_procs_file(struct page *page, struct list_head *to_kill,
                }
        }
        read_unlock(&tasklist_lock);
-       mutex_unlock(&mapping->i_mmap_mutex);
+       i_mmap_unlock_read(mapping);
 }
 
 /*