Re: [PATCH] ubifs: Get/put page when changing PG_private

2018-12-15 Thread zhangjun
allocator failed to allocate memory. Fix this by using get/put_page when changing PG_private. Cc: Cc: zhangjun Fixes: 4ac1c17b2044 ("UBIFS: Implement ->migratepage()") Reported-by: zhangjun Signed-off-by: Richard Weinberger --- zhangjun, Please give this patch a try! Thanks, //ric

ubifs: fix page_count in ->ubifs_migrate_page()

2018-12-12 Thread zhangjun
unt() not increase. Therefore, the expected_count of UBIFS is different from the general case. Signed-off-by: zhangjun --- fs/ubifs/file.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 1b78f2e..2136a5c 100644 --- a/fs/ubifs/file.c ++

Re: ubifs: fix page_count in ->ubifs_migrate_page()

2018-12-13 Thread zhangjun
On 2018/12/13 下午10:23, Richard Weinberger wrote: Hello zhangjun, thanks a lot for bringing this up! Am Mittwoch, 12. Dezember 2018, 15:13:57 CET schrieb zhangjun: Because the PagePrivate() in UBIFS is different meanings, alloc_cma() will fail when one dirty page cache located in the type

[PATCH v2] ubifs: fix page_count in ->ubifs_migrate_page()

2018-12-13 Thread zhangjun
unt() not increase. Therefore, the expected_count of UBIFS is different from the general case. Signed-off-by: zhangjun --- fs/ubifs/file.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 1b78f2e..890dfce 100644 --- a/fs/ubifs/fil

[PATCH] fix page_count in ->iomap_migrate_page()

2018-12-13 Thread zhangjun
() if the flag is set. Signed-off-by: zhangjun --- fs/iomap.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fs/iomap.c b/fs/iomap.c index 64ce240..352e58a 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -544,8 +544,17 @@ iomap_migrate_page(struct address_space *mapping

Re: ubifs: fix page_count in ->ubifs_migrate_page()

2018-12-13 Thread zhangjun
On 2018/12/14 上午6:57, Dave Chinner wrote: On Thu, Dec 13, 2018 at 03:23:37PM +0100, Richard Weinberger wrote: Hello zhangjun, thanks a lot for bringing this up! Am Mittwoch, 12. Dezember 2018, 15:13:57 CET schrieb zhangjun: Because the PagePrivate() in UBIFS is different meanings, alloc_cma

Re: [PATCH] ubifs: Get/put page when changing PG_private

2018-12-24 Thread zhangjun
some pages owned by UBIFS. The lead to situations where the CMA memory allocator failed to allocate memory. Fix this by using get/put_page when changing PG_private. Cc: Cc: zhangjun Fixes: 4ac1c17b2044 ("UBIFS: Implement ->migratepage()") Reported-by: zhangjun Signed-off-by: Richa