Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754401Ab3GVMvg (ORCPT ); Mon, 22 Jul 2013 08:51:36 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:59036 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753887Ab3GVMve (ORCPT ); Mon, 22 Jul 2013 08:51:34 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: cbfee68d-b7f096d0000043fc-88-51ed2ad57916 Content-transfer-encoding: 8BIT Message-id: <1374497479.26443.20.camel@kjgkr> Subject: Re: [PATCH] f2fs: add the missing delection of orphan inode entry in write_orphan_inodes() From: Jaegeuk Kim Reply-to: jaegeuk.kim@samsung.com To: Gu Zheng Cc: f2fs , linux-kernel Date: Mon, 22 Jul 2013 21:51:19 +0900 In-reply-to: <51E8F65F.9040007@cn.fujitsu.com> References: <51E8F65F.9040007@cn.fujitsu.com> Organization: Samsung X-Mailer: Evolution 3.2.3-0ubuntu6 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKIsWRmVeSWpSXmKPExsVy+t8zfd2rWm8DDTr+c1o8bz/AbHFpkbvF 5V1z2ByYPf4fnMTssXvBZyaPz5vkApijuGxSUnMyy1KL9O0SuDJWf7vEXHCdvWL5zGnsDYyT 2boYOTkkBEwkdk3/zgJhi0lcuLceKM7FISSwjFHi4KG/jDBFvWueskMkFjFKfD19ACzBKyAo 8WPyPaBuDg5mAXmJI5eyQcLMAuoSk+YtYoaof80o8Wj/elaIel2Jvy9amEFsYYFUifdvOxlB etkEtCU27zcACQsJKEq83X8XrFxEQE3i2btLTBAzEyQenu8Hi7MIqEpc/3wOLM4poCfxp/sL I0SvrsT/J7PBxvMLiEocXridGeJ+JYnd7Z1g90sI7GOXOPR1PQvEIAGJb5MPgd0vISArsekA VL2kxMEVN1gmMErMQvLlLIQvZyH5cgEj8ypG0dSC5ILipPQiQ73ixNzi0rx0veT83E2MkCjr 3c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EUXvmjdSF7XvnHGGt8SjWuLf9k8ZDRfnOKM8vu2rNrSyfJ cs/e/m7Hg18VKsLne3c/kTit8ZetoeDG/jXd3cL1pR0fvC/eqPizLcVh2UOdtm2mq0U+PbgS 27PycZwSS3FGoqEWc1FxIgAX3UwSJQMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1191 Lines: 42 Hi, 2013-07-19 (금), 16:18 +0800, Gu Zheng: > After writing orphan inode entry in jornal block, we need to delete each > entry from the orphan entry list, and release them. > > > Signed-off-by: Gu Zheng > --- > fs/f2fs/checkpoint.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c > index 66a6b85..290db04 100644 > --- a/fs/f2fs/checkpoint.c > +++ b/fs/f2fs/checkpoint.c > @@ -337,6 +337,10 @@ static void write_orphan_inodes(struct f2fs_sb_info *sbi, block_t start_blk) > memset(orphan_blk, 0, sizeof(*orphan_blk)); > page_exist: > orphan_blk->ino[nentries++] = cpu_to_le32(orphan->ino); > + > + list_del(&orphan->list); > + kmem_cache_free(orphan_entry_slab, orphan); > + sbi->n_orphans--; NAK. We should not release them here. Only f2fs_evict_inode can do it. > } > if (!page) > goto end; -- Jaegeuk Kim Samsung -- 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/