mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
ext4: add ext4_mb_unload_buddy in the error path
commit 02b7831019 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>
This commit is contained in:
parent
5720f8de25
commit
d2e926777a
|
|
@ -4636,6 +4636,7 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
|
|||
*/
|
||||
new_entry = kmem_cache_alloc(ext4_free_data_cachep, GFP_NOFS);
|
||||
if (!new_entry) {
|
||||
ext4_mb_unload_buddy(&e4b);
|
||||
err = -ENOMEM;
|
||||
goto error_return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user