android_kernel_samsung_msm8976/include
Oleg Nesterov 16a37d8853 mm: introduce vma_is_anonymous(vma) helper
commit b5330628546616af14ff23075fbf8d4ad91f6e25 upstream.

special_mapping_fault() is absolutely broken.  It seems it was always
wrong, but this didn't matter until vdso/vvar started to use more than
one page.

And after this change vma_is_anonymous() becomes really trivial, it
simply checks vm_ops == NULL.  However, I do think the helper makes
sense.  There are a lot of ->vm_ops != NULL checks, the helper makes the
caller's code more understandable (self-documented) and this is more
grep-friendly.

This patch (of 3):

Preparation.  Add the new simple helper, vma_is_anonymous(vma), and change
handle_pte_fault() to use it.  It will have more users.

The name is not accurate, say a hpet_mmap()'ed vma is not anonymous.
Perhaps it should be named vma_has_fault() instead.  But it matches the
logic in mmap.c/memory.c (see next changes).  "True" just means that a
page fault will use do_anonymous_page().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.16 as dependency of "mm/mincore.c: make mincore() more
 conservative"; adjusted context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 22:11:11 +02:00
..
acpi
asm-generic asm-generic: Fix local variable shadow in __set_fixmap_offset 2019-07-27 22:08:56 +02:00
clocksource
crypto crypto: authenc - Export key parsing helper function 2019-07-27 21:53:36 +02:00
drm treewide: Fix typo in Documentation/DocBook 2019-07-27 22:10:20 +02:00
dt-bindings
keys KEYS: user: Align the payload buffer 2019-07-27 22:10:23 +02:00
kvm
linux mm: introduce vma_is_anonymous(vma) helper 2019-07-27 22:11:11 +02:00
math-emu
media media: v4l: event: Prevent freeing event subscriptions while accessed 2019-07-27 21:51:55 +02:00
memory
misc
net BACKPORT: tcp: add tcp_min_snd_mss sysctl 2019-07-27 22:11:10 +02:00
pcmcia
ras
rdma
rxrpc
scsi scsi: libsas: align sata_device's rps_resp on a cacheline 2019-07-27 21:46:11 +02:00
sdp
soc/qcom qseecom: Add a new smc cmd to check RPMB key provision status 2019-07-27 22:10:55 +02:00
sound lsm: check payload size validity before using it as array index 2019-07-27 22:10:55 +02:00
target
trace Revert "lowmemorykiller: adapt to vmpressure" 2019-07-27 22:09:44 +02:00
uapi tcp: tcp_fragment() should apply sane memory limits 2019-07-27 22:11:09 +02:00
video
xen
Kbuild