Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755697Ab3EUD6X (ORCPT ); Mon, 20 May 2013 23:58:23 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:32269 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755552Ab3EUD6V (ORCPT ); Mon, 20 May 2013 23:58:21 -0400 X-AuditID: cbfee690-b7f6f6d00000740c-0a-519af0d9cf69 From: Jaegeuk Kim Cc: Jaegeuk Kim , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH 3/3] f2fs: fix wrong condition check Date: Tue, 21 May 2013 12:56:33 +0900 Message-id: <1369108593-880-3-git-send-email-jaegeuk.kim@samsung.com> X-Mailer: git-send-email 1.8.1.3.566.gaa39828 In-reply-to: <1369108593-880-1-git-send-email-jaegeuk.kim@samsung.com> References: <1369108593-880-1-git-send-email-jaegeuk.kim@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsVy+t8zA92bH2YFGiw9L2txfddfJotLi9wt 9uw9yWJxedccNgcWj90LPjN59G1ZxejxeZNcAHMUl01Kak5mWWqRvl0CV8bdxi0sBQvZK6Zu mMfcwHiftYuRk0NCwETiQd9ldghbTOLCvfVsXYxcHEICyxglPhzYxgxTtODObyYQW0hgOqPE 3516EEVtTBLTrq4F6ubgYBPQlti83wCkRkSAWWLB1POMIDXMAhMYJf4ves8CUiMMNGjplzyQ GhYBVYmfrUvZQGxeAVeJiTOmQe3SlVj9/znYQZwCbhI9k/4wgbQKAdXcflEAMlJC4DubxLKz rewQcwQkvk0+BDZeQkBWYtMBqDGSEgdX3GCZwCi8gJFhFaNoakFyQXFSepGJXnFibnFpXrpe cn7uJkZIuE7YwXjvgPUhxmSgcROZpUST84HhnlcSb2hsZmRhamJqbGRuaUaasJI4r3qLdaCQ QHpiSWp2ampBalF8UWlOavEhRiY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filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1137 Lines: 42 While an orphan inode has zero link_count, f2fs_gc is able to select the inode for foreground gc. - f2fs_gc - do_garbage_collect - gc_data_segment : f2fs_iget is failed : get_valid_blocks() != 0, so that retry --> here we got the infinite loop. This patch resolved this issue. Signed-off-by: Jaegeuk Kim --- fs/f2fs/inode.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index a18946e..b44a4c1 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -109,12 +109,6 @@ struct inode *f2fs_iget(struct super_block *sb, unsigned long ino) ret = do_read_inode(inode); if (ret) goto bad_inode; - - if (!sbi->por_doing && inode->i_nlink == 0) { - ret = -ENOENT; - goto bad_inode; - } - make_now: if (ino == F2FS_NODE_INO(sbi)) { inode->i_mapping->a_ops = &f2fs_node_aops; -- 1.8.1.3.566.gaa39828 -- 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/