From patchwork Wed Mar 24 14:21:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jing zhang X-Patchwork-Id: 48418 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E5FB6B6F11 for ; Thu, 25 Mar 2010 01:27:11 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756251Ab0CXO1K (ORCPT ); Wed, 24 Mar 2010 10:27:10 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:57428 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756144Ab0CXO1J (ORCPT ); Wed, 24 Mar 2010 10:27:09 -0400 Received: by gyg8 with SMTP id 8so3717005gyg.19 for ; Wed, 24 Mar 2010 07:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=g9ytfrhdZZixri7XXgafRY0MxX9iGEeXmOvk6PFYmHk=; b=TPX44AEe4fBcNbA2Gx1tj34CNtZs9YuR1ChYmMc/kY9vGDmNaYsdUtQFha8VVCU5nd pwNIRiaPv2j/HxjCs3orqmxUB6DhUt0ME6dePUHyfJ5p51asY0S70TW6JZrS1oEiLl8N B+JkOswSmNcjbZxM8Fvj8lmk6ejYt/PAfx15o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=bZYx8RCG5ISQyeXn1xQBds8g7K+kWd0sFVccujNMsk0YY2RyLG3vEqdFI3i6MaEXGk jbxWKu3RL0OCAfZi7iiac78jXDTyXwntnxZiY/7XE3j4ZputyWIZyve9RwprsPMg9T+t QEhYfShGdDRHiodXVh2BorAJZyNvAjx45wz9Y= MIME-Version: 1.0 Received: by 10.101.105.22 with SMTP id h22mr1851579anm.185.1269440461658; Wed, 24 Mar 2010 07:21:01 -0700 (PDT) Date: Wed, 24 Mar 2010 22:21:01 +0800 Message-ID: Subject: [PATCH] ext4: page_cache pages not released in ext4_mb_load_buddy() From: jing zhang To: linux-ext4 Cc: "Theodore Ts'o" , Andreas Dilger , Dave Kleikamp Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Jing Zhang Date: Wed Mar 24 20:38:48 2010 If ext4_mb_init_cache() returns error, there is no page_cache_release() issued. Cc: Theodore Ts'o Cc: Andreas Dilger Cc: Dave Kleikamp Signed-off-by: Jing Zhang --- the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-2.6.32/fs/ext4/mballoc.c 2009-12-03 11:51:22.000000000 +0800 +++ ext4_mm_leak/mballoc-9.c 2010-03-24 22:24:56.000000000 +0800 @@ -1132,8 +1132,6 @@ repeat_load_buddy: e4b->bd_buddy = page_address(page) + (poff * sb->s_blocksize); mark_page_accessed(page); - BUG_ON(e4b->bd_bitmap_page == NULL); - BUG_ON(e4b->bd_buddy_page == NULL); return 0; @@ -1142,6 +1140,8 @@ err: page_cache_release(e4b->bd_bitmap_page); if (e4b->bd_buddy_page) page_cache_release(e4b->bd_buddy_page); + if (page) + page_cache_release(page); e4b->bd_buddy = NULL; e4b->bd_bitmap = NULL; -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in