Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbbKJKpw (ORCPT ); Tue, 10 Nov 2015 05:45:52 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:58395 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160AbbKJKpu (ORCPT ); Tue, 10 Nov 2015 05:45:50 -0500 X-AuditID: cbfee61a-f79a06d000005c6f-44-5641cadd1383 From: Chao Yu To: Jaegeuk Kim Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] f2fs: fix to remove directory inode from dirty list Date: Tue, 10 Nov 2015 18:45:07 +0800 Message-id: <01b901d11ba4$f56a5cb0$e03f1610$@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: AdEbpNDHO2Xo0D6XQsi+gSSNKDGCQg== Content-language: zh-cn X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDLMWRmVeSWpSXmKPExsVy+t9jAd27pxzDDFYt57F4sn4Ws8WlRe4W l3fNYXNg9ti0qpPNY/eCz0wenzfJBTBHcdmkpOZklqUW6dslcGUs/DWNqeAqa8WXOy+YGxjP sHQxcnJICJhInDwzkR3CFpO4cG89WxcjF4eQwFJGiR/L5jFBOK8YJVZd7AOrYhNQkVje8Z8J xBYBsg8tugwWZxbwkGjs+M4KYgsD2X0rethAbBYBVYmJ21rBangFLCVmNvSwQNiCEj8m32OB 6NWSWL/zOBOELS+xec1bZoiLFCR2nH3NCLFLT2Ll1/dsEDXiEhuP3GKZwCgwC8moWUhGzUIy ahaSlgWMLKsYJVILkguKk9JzDfNSy/WKE3OLS/PS9ZLzczcxgsP4mdQOxoO73A8xCnAwKvHw TvjmECbEmlhWXJl7iFGCg1lJhNf+BVCINyWxsiq1KD++qDQntfgQozQHi5I4r76nUZiQQHpi SWp2ampBahFMlomDU6qBcf+HpD/vnrmnH5+0WDz4EYPe+RTp/FnFFzTaHv6JSHON+2Pb+fr0 V5bWWbX+QtazCmRCt9/Qev3ruH190vzTOn9iWROuKrs/n/3T6tG5WQePXbx17Fd1gPAKs5ic hpUicnonm+NPLuRZEjH5osC8yqrA3t2rbgX7MWUWPHHetGpqzurklj17hZRYijMSDbWYi4oT ATrmpBBfAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 941 Lines: 34 If last dirty dentry page was writebacked in reclaim path, we should remove its directory inode from global dirty list to avoid unnecessary flush for this inode when doing checkpoint. Signed-off-by: Chao Yu --- fs/f2fs/data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index c3e1ffa..6c689e9 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1182,8 +1182,10 @@ out: unlock_page(page); if (need_balance_fs) f2fs_balance_fs(sbi); - if (wbc->for_reclaim) + if (wbc->for_reclaim) { f2fs_submit_merged_bio(sbi, DATA, WRITE); + remove_dirty_dir_inode(inode); + } return 0; redirty_out: -- 2.6.1 -- 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/