From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH] ubifs: Get/put page when changing PG_private To: Richard Weinberger , linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hsiangkao@mail.ru, kirill.shutemov@linux.intel.com, stable@vger.kernel.org References: <20181215150130.19381-1-richard@nod.at> <386368225.TvJUPtmGVW@blindfold> From: zhangjun Message-ID: Date: Tue, 25 Dec 2018 10:42:37 +0800 MIME-Version: 1.0 In-Reply-To: <386368225.TvJUPtmGVW@blindfold> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: stable-owner@vger.kernel.org List-ID: On 2018/12/21 下午4:56, Richard Weinberger wrote: > Am Samstag, 15. Dezember 2018, 16:01:30 CET schrieb Richard Weinberger: >> The page migration code assumes that a page with PG_private >> set has its page count elevated by 1. >> UBIFS never did this and therefore the migration code was unable >> to migrate 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: Richard Weinberger > FYI, on the XFS side a similar change caused a regression. > https://marc.info/?l=linux-fsdevel&m=154530861202448&w=2 > > Until this regression is not fully understood, including the implications > for UBIFS, I'll not merge this patch. > > Thanks, > //richard > > Hello,richard Before fully understanding this regression, in order to fix the bug of cma_alloc(), submit a conservative patch that modifies count in iomap_migrate_page(). Can you consider merging first? https://marc.info/?l=linux-kernel&m=154473132332661&w=2 Thanks //zhangjun