diff options
author | Salman Qazi <sqazi@google.com> | 2012-06-01 05:51:27 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-06-01 05:51:27 +0200 |
commit | 02b7831019ea4e7994968c84b5826fa8b248ffc8 (patch) | |
tree | 929419054f15d2582d2b977505f55ec421e39549 /fs/ext4/mballoc.c | |
parent | ext4: don't trash state flags in EXT4_IOC_SETFLAGS (diff) | |
download | linux-02b7831019ea4e7994968c84b5826fa8b248ffc8.tar.xz linux-02b7831019ea4e7994968c84b5826fa8b248ffc8.zip |
ext4: add ext4_mb_unload_buddy in the error path
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>
Cc: stable@kernel.org
Diffstat (limited to '')
-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 e4b4ac1ec684..3d9277c48bc8 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -4634,6 +4634,7 @@ do_more: */ new_entry = kmem_cache_alloc(ext4_free_data_cachep, GFP_NOFS); if (!new_entry) { + ext4_mb_unload_buddy(&e4b); err = -ENOMEM; goto error_return; } |