mirror of https://github.com/OpenIPC/firmware.git
49 lines
1.4 KiB
Diff
49 lines
1.4 KiB
Diff
diff -drupN a/mm/vmacache.c b/mm/vmacache.c
|
|
--- a/mm/vmacache.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/mm/vmacache.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -6,44 +6,6 @@
|
|
#include <linux/vmacache.h>
|
|
|
|
/*
|
|
- * Flush vma caches for threads that share a given mm.
|
|
- *
|
|
- * The operation is safe because the caller holds the mmap_sem
|
|
- * exclusively and other threads accessing the vma cache will
|
|
- * have mmap_sem held at least for read, so no extra locking
|
|
- * is required to maintain the vma cache.
|
|
- */
|
|
-void vmacache_flush_all(struct mm_struct *mm)
|
|
-{
|
|
- struct task_struct *g, *p;
|
|
-
|
|
- count_vm_vmacache_event(VMACACHE_FULL_FLUSHES);
|
|
-
|
|
- /*
|
|
- * Single threaded tasks need not iterate the entire
|
|
- * list of process. We can avoid the flushing as well
|
|
- * since the mm's seqnum was increased and don't have
|
|
- * to worry about other threads' seqnum. Current's
|
|
- * flush will occur upon the next lookup.
|
|
- */
|
|
- if (atomic_read(&mm->mm_users) == 1)
|
|
- return;
|
|
-
|
|
- rcu_read_lock();
|
|
- for_each_process_thread(g, p) {
|
|
- /*
|
|
- * Only flush the vmacache pointers as the
|
|
- * mm seqnum is already set and curr's will
|
|
- * be set upon invalidation when the next
|
|
- * lookup is done.
|
|
- */
|
|
- if (mm == p->mm)
|
|
- vmacache_flush(p);
|
|
- }
|
|
- rcu_read_unlock();
|
|
-}
|
|
-
|
|
-/*
|
|
* This task may be accessing a foreign mm via (for example)
|
|
* get_user_pages()->find_vma(). The vmacache is task-local and this
|
|
* task's vmacache pertains to a different mm (ie, its own). There is
|