[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090111020352.GA4285@localhost.localdomain>
Date: Sun, 11 Jan 2009 11:03:53 +0900
From: Akinobu Mita <akinobu.mita@...il.com>
To: Josef Bacik <jbacik@...hat.com>
Cc: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Theodore Tso <tytso@....edu>, adilger@....com,
linux-ext4@...r.kernel.org
Subject: [PATCH] ext4: fix unhandled ext4_free_data allocation failure
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 <tytso@....edu>
Cc: adilger@....com
Cc: linux-ext4@...r.kernel.org
Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
---
fs/ext4/mballoc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists