]> git.baikalelectronics.ru Git - kernel.git/commit
mm/migrate: avoid possible unnecessary process right check in kernel_move_pages()
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 17 Oct 2020 23:14:03 +0000 (16:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 18 Oct 2020 16:27:09 +0000 (09:27 -0700)
commit9fb3def13478367bf8ed638db72d5503c146c0ec
tree0033042fe9ff030817fdc005d6788e2ba25e8a3b
parentd9cae158e772c283a9d015477e6c0d9ba22a94b3
mm/migrate: avoid possible unnecessary process right check in kernel_move_pages()

There is no need to check if this process has the right to modify the
specified process when they are same.  And we could also skip the security
hook call if a process is modifying its own pages.  Add helper function to
handle these.

Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Hongxiang Lou <louhongxiang@huawei.com>
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Christopher Lameter <cl@linux.com>
Link: https://lkml.kernel.org/r/20200819083331.19012-1-linmiaohe@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c