linux/include
Oleg Nesterov b533062854 mm: introduce vma_is_anonymous(vma) helper
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>
2015-09-08 15:35:28 -07:00
..
acpi Merge branch 'pm-cpufreq' 2015-09-01 15:52:35 +02:00
asm-generic Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-03 15:46:07 -07:00
clocksource
crypto Merge branch 'for-4.3/sg' of git://git.kernel.dk/linux-block 2015-09-02 13:22:38 -07:00
drm Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-09-04 15:49:32 -07:00
dt-bindings media updates for v4.3-rc1 2015-09-05 18:21:14 -07:00
keys
kvm
linux mm: introduce vma_is_anonymous(vma) helper 2015-09-08 15:35:28 -07:00
math-emu
media media updates for v4.3-rc1 2015-09-05 18:21:14 -07:00
memory
misc
net netfilter: nf_conntrack: make nf_ct_zone_dflt built-in 2015-09-02 16:32:56 -07:00
pcmcia
ras
rdma
rxrpc
scsi SCSI misc on 20150901 2015-09-02 12:22:54 -07:00
soc
sound ALSA: hda - Fix missing inline for dummy snd_hdac_set_codec_wakeup() 2015-09-02 12:24:55 +02:00
target
trace media updates for v4.3-rc1 2015-09-05 18:21:14 -07:00
uapi NFS client updates for Linux 4.3 2015-09-07 14:02:24 -07:00
video Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-09-04 15:49:32 -07:00
xen xen-netback: add support for multicast control 2015-09-02 11:45:00 -07:00
Kbuild