mm: use new helper functions around the i_mmap_mutex
[linux-2.6-block.git] / mm / memory-failure.c
index e5ee0ca7ae854610fc2335d46dd46b99eadf707f..5e2b26dab8dc04360d7cb1ac8ff98495d2f3cf56 100644 (file)
@@ -466,7 +466,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_write(mapping);
        read_lock(&tasklist_lock);
        for_each_process(tsk) {
                pgoff_t pgoff = page_to_pgoff(page);
@@ -488,7 +488,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_write(mapping);
 }
 
 /*