[PATCH RESEND] mm: fix some typos and code style problems

2021-04-19 Thread Shijie Luo
zsmalloc.c: s/of/or, s/give/given Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin --- include/linux/gfp.h| 2 +- include/linux/mmzone.h | 2 +- mm/rmap.c | 2 +- mm/swap.c | 4 ++-- mm/swap_state.c| 2 +- mm/z3fold.c| 2 +- mm/zsmalloc.c

[PATCH] mm: fix some typos and code style problems

2021-04-19 Thread Shijie Luo
zsmalloc.c: s/of/or, s/give/given Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin --- include/linux/gfp.h| 2 +- include/linux/mmzone.h | 2 +- mm/rmap.c | 2 +- mm/swap.c | 4 ++-- mm/swap_state.c| 2 +- mm/z3fold.c| 2 +- mm/zsmalloc.c

[PATCH] mm: mempolicy: fix potential pte_unmap_unlock pte error

2020-10-19 Thread Shijie Luo
to lock the pte resp. page_table_lock again.. Fixes: a7f40cfe3b7a ("mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified") Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin --- mm/mempolicy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

Re: [PATCH V2] mm: fix potential pte_unmap_unlock pte error

2020-10-19 Thread Shijie Luo
On 2020/10/19 14:59, Michal Hocko wrote: On Fri 16-10-20 22:11:51, Shijie Luo wrote: When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. This would really benefit from some improvements.

[PATCH V2] mm: fix potential pte_unmap_unlock pte error

2020-10-16 Thread Shijie Luo
When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. Signed-off-by: Shijie Luo Signed-off-by: Michal Hocko Signed-off-by: Miaohe Lin --- mm/mempolicy.c | 6 +++--- 1 file changed, 3 inser

Re: [PATCH] mm: fix potential pte_unmap_unlock pte error

2020-10-16 Thread Shijie Luo
On 2020/10/16 22:05, osalva...@suse.de wrote: On 2020-10-16 15:42, Michal Hocko wrote: OK, I finally managed to convince my friday brain to think and grasped what the code is intended to do. The loop is hairy and we want to prevent from spurious EIO when all the pages are on a proper node. So th

Re: [PATCH] mm: fix potential pte_unmap_unlock pte error

2020-10-15 Thread Shijie Luo
On 2020/10/15 20:58, osalva...@suse.de wrote: On 2020-10-15 14:15, Shijie Luo wrote: When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks  and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. Signed-off-by: Shijie Luo Signed-off-by: linm

[PATCH] mm: fix potential pte_unmap_unlock pte error

2020-10-15 Thread Shijie Luo
When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. Signed-off-by: Shijie Luo Signed-off-by: linmiaohe --- mm/mempolicy.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git