]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm, madvise: use vma_is_anonymous() to check for anon VMA
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Wed, 21 Oct 2015 22:03:45 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:45 +0000 (09:03 +1100)
commita550e2f5c3a3800889a28fe0a56d6bd9e73fd81d
tree7182954d1a7c79c5ee9ba8412cd2fbeacf3577b1
parent0895aa762816af3ba4eda17799d03aaf81f780c1
mm, madvise: use vma_is_anonymous() to check for anon VMA

!vma->vm_file is not reliable to detect anon VMA, because not all
drivers bother set it. Let's use vma_is_anonymous() instead.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/madvise.c