[PATCH 4/4] mempolicy: remove the "task" arg of vma_policy_mof() and simplify it

2014-08-20 Thread Oleg Nesterov
1. vma_policy_mof(task) is simply not safe unless task == current, it can race with do_exit()->mpol_put(). Remove this arg and update its single caller. 2. vma can not be NULL, remove this check and simplify the code. Signed-off-by: Oleg Nesterov --- include/linux/mempolicy.h |2 +-

[PATCH 4/4] mempolicy: remove the task arg of vma_policy_mof() and simplify it

2014-08-20 Thread Oleg Nesterov
1. vma_policy_mof(task) is simply not safe unless task == current, it can race with do_exit()-mpol_put(). Remove this arg and update its single caller. 2. vma can not be NULL, remove this check and simplify the code. Signed-off-by: Oleg Nesterov o...@redhat.com ---