Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933301AbbKMK2Z (ORCPT ); Fri, 13 Nov 2015 05:28:25 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:50848 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932418AbbKMK2V (ORCPT ); Fri, 13 Nov 2015 05:28:21 -0500 X-AuditID: cbfee61a-f79a06d000005c6f-34-5645bb42d5c1 From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: clear page uptodate when dropping cache for atomic write Date: Fri, 13 Nov 2015 18:27:35 +0800 Message-id: <029801d11dfe$049a3a10$0dceae30$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AdEd/D5oD2MfueL5TtGEOxvy4o3bcQ== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsVy+t9jAV3n3a5hBq8fslg8WT+L2eLSIneL y7vmsDkwe2xa1cnmsXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDJW39jFUnCLteLk0ifsDYzn WLoYOTkkBEwk1u/7xgphi0lcuLeerYuRi0NIYCmjxN7H21ghnFeMEqs+PmECqWITUJFY3vEf zBYBsg8tuswOYjMLeEg0dnwHmyQs4C9xbc8rRhCbRUBV4mr3NLAaXgFLiSuXdrFC2IISPybf Y4Ho1ZJYv/M4E4QtL7F5zVtmiIsUJHacfQ00hwNol57ErkduECXiEhuP3GKZwCgwC8mkWUgm zUIyaRaSlgWMLKsYJVILkguKk9JzDfNSy/WKE3OLS/PS9ZLzczcxgoP4mdQOxoO73A8xCnAw KvHw7nzhEibEmlhWXJl7iFGCg1lJhHfxM6AQb0piZVVqUX58UWlOavEhRmkOFiVxXn1PozAh gfTEktTs1NSC1CKYLBMHp1QD4+p85S2OYslKGZ8X3o3quNS/ZDXvG/7fmlHM/fddHiuwz2Q/ fzk68pDapi2c/SvnzXNa4/fjQrSHuPLhAyc+xjS15IVGZ1RNL+/v7V8iJW4UrmZ7lW0JR922 9Jc7ZaZcPvJIZ7vX6f29nO51Cj2JxbNmvOqozGPq28QqcpdRQOr41ZNFPVO3KrEUZyQaajEX FScCAGe6u/9eAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 950 Lines: 30 We should clear uptodate flag for all pages atomic written when we drop them, otherwise before these cached pages were reclaimed or invalidated eventually, we will see invalid data when hitting them again. Signed-off-by: Chao Yu --- fs/f2fs/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index f77b325..23759fb 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -257,6 +257,7 @@ int commit_inmem_pages(struct inode *inode, bool abort) submit_bio = true; } } else { + ClearPageUptodate(cur->page); trace_f2fs_commit_inmem_page(cur->page, INMEM_DROP); } set_page_private(cur->page, 0); -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/