diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-07-30 22:17:17 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-09-03 21:31:24 +0200 |
commit | 7b641785cfa68f6668aad6bc036450827916ec46 (patch) | |
tree | 9728c8e54e77cf85d4a689b3835e488c3caee4b8 /drivers/tty/nozomi.c | |
parent | bbe7db75199a90395de72f55f3086d8df6982378 (diff) |
ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa struct
commit 86f0afd463215fc3e58020493482faa4ac3a4d69 upstream.
If there is a failure while allocating the preallocation structure, a
number of blocks can end up getting marked in the in-memory buddy
bitmap, and then not getting released. This can result in the
following corruption getting reported by the kernel:
EXT4-fs error (device sda3): ext4_mb_generate_buddy:758: group 1126,
12793 clusters in bitmap, 12729 in gd
In that case, we need to release the blocks using mb_free_blocks().
Tested: fs smoke test; also demonstrated that with injected errors,
the file system is no longer getting corrupted
Google-Bug-Id: 16657874
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/tty/nozomi.c')
0 files changed, 0 insertions, 0 deletions