vm: avoid using find_vma_prev() unnecessarily
Linus Torvalds authored
Several users of "find_vma_prev()" were not in fact interested in the
previous vma if there was no primary vma to be found either.  And in
those cases, we're much better off just using the regular "find_vma()",
and then "prev" can be looked up by just checking vma->vm_prev.

The find_vma_prev() semantics are fairly subtle (see Mikulas' recent
commit 83cd904d

: "mm: fix find_vma_prev"), and the whole "return
prev by reference" means that it generates worse code too.

Thus this "let's avoid using this inconvenient and clearly too subtle
interface when we don't really have to" patch.

Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
097d5910
Name Last commit Last update
..
Kconfig Merge branch 'master' into x86/memblock
Kconfig.debug mm: more intensive memory corruption debugging
Makefile Cross Memory Attach
backing-dev.c backing-dev: fix wakeup timer races with bdi_unregister()
bootmem.c mm: bootmem: try harder to free pages in bulk
bounce.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
cleancache.c mm: cleancache core ops functions and config
compaction.c mm: compaction: check for overlapping nodes during isolation for migration
debug-pagealloc.c mm, x86: Remove debug_pagealloc_enabled
dmapool.c mm: fix implicit stat.h usage in dmapool.c
fadvise.c fadvise: only initiate writeback for specified range with FADV_DONTNEED
failslab.c switch debugfs to umode_t
filemap.c readahead: fix pipeline break caused by block plug
filemap_xip.c mm/filemap_xip.c: fix race condition in xip_file_fault()
fremap.c mm: delete various needless include <linux/module.h>
highmem.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
huge_memory.c mm: thp: fix BUG on mm->nr_ptes
hugetlb.c flush_tlb_range() needs ->page_table_lock when ->mmap_sem is not held
hwpoison-inject.c Fix common misspellings
init-mm.c atomic: use <linux/atomic.h>
internal.h mm: thp: tail page refcounting fix
kmemcheck.c kmemcheck: add hooks for the page allocator
kmemleak-test.c kmemleak: remove memset by using kzalloc
kmemleak.c kmemleak: Disable early logging when kmemleak is off by default
ksm.c memcg: fix GPF when cgroup removal races with last exit
maccess.c
madvise.c
memblock.c
memcontrol.c
memory-failure.c
memory.c
memory_hotplug.c
mempolicy.c
mempool.c
migrate.c
mincore.c
mlock.c
mm_init.c
mmap.c
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nobootmem.c
nommu.c
oom_kill.c
page-writeback.c
page_alloc.c
page_cgroup.c
page_io.c
page_isolation.c
pagewalk.c
percpu-km.c
percpu-vm.c
percpu.c
pgtable-generic.c
prio_tree.c
process_vm_access.c
quicklist.c
readahead.c
rmap.c
shmem.c
slab.c
slob.c
slub.c
sparse-vmemmap.c
sparse.c
swap.c
swap_state.c
swapfile.c
thrash.c
truncate.c
util.c
vmalloc.c
vmscan.c
vmstat.c