]> git.baikalelectronics.ru Git - kernel.git/commit
ksm: use find_mergeable_vma in try_to_merge_with_ksm_page
authorAndrea Arcangeli <aarcange@redhat.com>
Fri, 6 Nov 2015 02:49:16 +0000 (18:49 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
commitdb53f00265252cdcec6d374c1da3410a858c3fab
tree40353db4104bd1b5b1339a8e3dfc647509d9903c
parent4d1e4e8f0e18ee4d65330b491d402d9115c9e017
ksm: use find_mergeable_vma in try_to_merge_with_ksm_page

Doing the VM_MERGEABLE check after the page == kpage check won't provide
any meaningful benefit.  The !vma->anon_vma check of find_mergeable_vma is
the only superfluous bit in using find_mergeable_vma because the !PageAnon
check of try_to_merge_one_page() implicitly checks for that, but it still
looks cleaner to share the same find_mergeable_vma().

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Petr Holasek <pholasek@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/ksm.c