From patchwork Sun Jan 11 02:03:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 17775 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.176.167]) by ozlabs.org (Postfix) with ESMTP id EE360DE4E0 for ; Sun, 11 Jan 2009 13:04:11 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353AbZAKCEK (ORCPT ); Sat, 10 Jan 2009 21:04:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751567AbZAKCEJ (ORCPT ); Sat, 10 Jan 2009 21:04:09 -0500 Received: from ti-out-0910.google.com ([209.85.142.187]:46354 "EHLO ti-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751489AbZAKCEG (ORCPT ); Sat, 10 Jan 2009 21:04:06 -0500 Received: by ti-out-0910.google.com with SMTP id b6so11420716tic.23 for ; Sat, 10 Jan 2009 18:04:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=JVriHgar5Y+CWSXQd8xqxty3C+58M+CZ52yDllg8EeQ=; b=YGMw8PD3CwTBwO0XdJ//eZHk2QXeGr1c4lVjZ0jzmeXLiXhBI1J9sWF3RZPo7xsWnB Y3yLL2Fk0LBfdOXRivyZdgkm7VMLBvuamQ+OPUoBy328yokK4k7yPNvd9DWRWCWPvhG8 Ny4ewzFWmKT+qADHTyypi/s5rgurcAwF9GESU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=xWJFv/lGtvo44bfp4KbHU9+MufOkVI9paUACVoa8mpXKMV0fQrHXLGF1eT0SkGE8nT j3V/oF0mPfCCTaxokSftUnPQU4JhTe8+mCrVveULcp0LSyNNP+305qSM+ZfuNapJtWTZ y8b6vnrWrEu2jKEuPyiQ5J2r0wWNXt9nbzr/8= Received: by 10.110.84.3 with SMTP id h3mr4998505tib.15.1231639444370; Sat, 10 Jan 2009 18:04:04 -0800 (PST) Received: from localhost.localdomain (p21124-adsao01yokonib1-acca.kanagawa.ocn.ne.jp [220.97.179.124]) by mx.google.com with ESMTPS id b7sm6051097tic.3.2009.01.10.18.04.02 (version=SSLv3 cipher=RC4-MD5); Sat, 10 Jan 2009 18:04:03 -0800 (PST) Date: Sun, 11 Jan 2009 11:03:53 +0900 From: Akinobu Mita To: Josef Bacik Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, Theodore Tso , adilger@sun.com, linux-ext4@vger.kernel.org Subject: [PATCH] ext4: fix unhandled ext4_free_data allocation failure Message-ID: <20090111020352.GA4285@localhost.localdomain> References: <20081223104016.GC7217@localhost.localdomain> <20081223142915.GA23303@unused.rdu.redhat.com> <961aa3350812231437x4debaf9byf230a63582561010@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <961aa3350812231437x4debaf9byf230a63582561010@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org In ext4_mb_free_blocks() ext4_free_data allocation failure is not handled. This error handling cannot be simple error return because ext4_mb_free_blocks() cannot fail. This patch add __GFP_NOFAIL to gfp mask for the allocation. Cc: Theodore Tso Cc: adilger@sun.com Cc: linux-ext4@vger.kernel.org Signed-off-by: Akinobu Mita --- fs/ext4/mballoc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: 2.6-git/fs/ext4/mballoc.c =================================================================== --- 2.6-git.orig/fs/ext4/mballoc.c +++ 2.6-git/fs/ext4/mballoc.c @@ -4885,7 +4885,8 @@ do_more: * blocks being freed are metadata. these blocks shouldn't * be used until this transaction is committed */ - new_entry = kmem_cache_alloc(ext4_free_ext_cachep, GFP_NOFS); + new_entry = kmem_cache_alloc(ext4_free_ext_cachep, + GFP_NOFS | __GFP_NOFAIL); new_entry->start_blk = bit; new_entry->group = block_group; new_entry->count = count;