diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-12-20 07:26:59 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-12-20 07:26:59 -0500 |
commit | b72143ab3ed566a12560fa4411a1f02c276dcc39 (patch) | |
tree | 8a4ad3ee044ca2c398fc769973bebfa0b721fca6 /fs/ext4 | |
parent | 0ff2ea7d84e31176a046a1eabea59d6e4eecd998 (diff) |
ext4: Add error checking to kmem_cache_alloc() call in ext4_free_blocks()
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/mballoc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 731b6f738a03..46d5414f59c1 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -4626,7 +4626,11 @@ do_more: | |||
4626 | * blocks being freed are metadata. these blocks shouldn't | 4626 | * blocks being freed are metadata. these blocks shouldn't |
4627 | * be used until this transaction is committed | 4627 | * be used until this transaction is committed |
4628 | */ | 4628 | */ |
4629 | new_entry = kmem_cache_alloc(ext4_free_ext_cachep, GFP_NOFS); | 4629 | new_entry = kmem_cache_alloc(ext4_free_ext_cachep, GFP_NOFS); |
4630 | if (!new_entry) { | ||
4631 | err = -ENOMEM; | ||
4632 | goto error_return; | ||
4633 | } | ||
4630 | new_entry->start_blk = bit; | 4634 | new_entry->start_blk = bit; |
4631 | new_entry->group = block_group; | 4635 | new_entry->group = block_group; |
4632 | new_entry->count = count; | 4636 | new_entry->count = count; |