Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756654AbaDKJ7H (ORCPT ); Fri, 11 Apr 2014 05:59:07 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:37138 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1755160AbaDKJ7E (ORCPT ); Fri, 11 Apr 2014 05:59:04 -0400 X-IronPort-AV: E=Sophos;i="4.97,841,1389715200"; d="scan'208";a="29145728" Message-ID: <5347BAAF.9030004@cn.fujitsu.com> Date: Fri, 11 Apr 2014 17:49:35 +0800 From: Gu Zheng User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: Kim CC: f2fs , fsdevel , linux-kernel Subject: [PATCH 1/7] f2fs: put the bio when issue_flush completed Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.100] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Put the bio when the flush cmd issued, it also can fix the following kmemleak: unreferenced object 0xffff8800270c73c0 (size 200): comm "f2fs_flush-7:0", pid 27161, jiffies 4312127988 (age 988.503s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 40 07 81 19 01 88 ff ff ........@....... 01 00 00 00 00 00 00 f0 11 14 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x72/0x96 [] slab_post_alloc_hook+0x28/0x2a [] kmem_cache_alloc+0xec/0x157 [] mempool_alloc_slab+0x15/0x17 [] mempool_alloc+0x71/0x138 [] bio_alloc_bioset+0x93/0x18c [] issue_flush_thread+0x8d/0x145 [f2fs] [] kthread+0xba/0xc2 [] ret_from_fork+0x7c/0xb0 [] 0xffffffffffffffff Signed-off-by: Gu Zheng --- fs/f2fs/segment.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 085f548..524b7ed 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -226,6 +226,7 @@ repeat: next = cmd->next; complete(&cmd->wait); } + bio_put(bio); sm_i->dispatch_list = NULL; } -- 1.7.7 -- 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/