mm: mempolicy: turn vma_set_policy() into vma_dup_policy()
authorOleg Nesterov <oleg@redhat.com>
Wed, 11 Sep 2013 21:20:14 +0000 (14:20 -0700)
committerDanny Wood <danwood76@gmail.com>
Thu, 28 Jan 2021 09:32:01 +0000 (09:32 +0000)
commit7fbac9c3a4a687bf5fb64b252d4deee7fab8ae02
treeaa4782f061d25c6d88d657f6dc2bf5dfebbd1513
parent2194d4de6cf4ac38253ffcf8c1aead935901d56c
mm: mempolicy: turn vma_set_policy() into vma_dup_policy()

Simple cleanup.  Every user of vma_set_policy() does the same work, this
looks a bit annoying imho.  And the new trivial helper which does
mpol_dup() + vma_set_policy() to simplify the callers.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: Ice9406b849ca330fc0b6bc2436a685fa6fd50217
include/linux/mempolicy.h
kernel/fork.c
mm/mempolicy.c
mm/mmap.c