diff options
author | Salman Qazi <sqazi@google.com> | 2012-05-31 23:51:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-10 00:33:04 +0900 |
commit | 97434cf53353728708c133af183a11a158c8c26a (patch) | |
tree | a4d054ee5c9c0969a2e9c086b8d192af06c8549b /fs | |
parent | eeb7cb57cf619ae9ab8210b21b49820ed40a472f (diff) |
ext4: add ext4_mb_unload_buddy in the error path
commit 02b7831019ea4e7994968c84b5826fa8b248ffc8 upstream.
ext4_free_blocks fails to pair an ext4_mb_load_buddy with a matching
ext4_mb_unload_buddy when it fails a memory allocation.
Signed-off-by: Salman Qazi <sqazi@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/mballoc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 0f1be7f1637..e3d55756997 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -4583,6 +4583,7 @@ do_more: */ new_entry = kmem_cache_alloc(ext4_free_ext_cachep, GFP_NOFS); if (!new_entry) { + ext4_mb_unload_buddy(&e4b); err = -ENOMEM; goto error_return; } |