remarkable-linux/fs/ext4
Theodore Ts'o 86f0afd463 ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa struct
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>
Cc: stable@vger.kernel.org
2014-07-30 22:17:17 -04:00
..
acl.c
acl.h
balloc.c ext4: remove metadata reservation checks 2014-07-15 06:02:38 -04:00
bitmap.c
block_validity.c
dir.c ext4: check inline directory before converting 2014-07-28 13:06:26 -04:00
ext4.h ext4: check inline directory before converting 2014-07-28 13:06:26 -04:00
ext4_extents.h ext4: rename uninitialized extents to unwritten 2014-04-20 23:45:47 -04:00
ext4_jbd2.c ext4: make local functions static 2014-05-12 10:50:23 -04:00
ext4_jbd2.h ext4: make local functions static 2014-05-12 10:50:23 -04:00
extents.c ext4: fix COLLAPSE RANGE test for bigalloc file systems 2014-07-29 10:45:31 -04:00
extents_status.c ext4: fix a potential deadlock in __ext4_es_shrink() 2014-07-12 15:32:24 -04:00
extents_status.h
file.c ext4: remove readpage() check in ext4_mmap_file() 2014-07-15 09:56:19 -04:00
fsync.c
hash.c
ialloc.c ext4: fix potential null pointer dereference in ext4_free_inode 2014-07-12 16:11:42 -04:00
indirect.c ext4: fix punch hole on files with indirect mapping 2014-07-15 06:03:38 -04:00
inline.c ext4: check inline directory before converting 2014-07-28 13:06:26 -04:00
inode.c ext4: fix punch hole on files with indirect mapping 2014-07-15 06:03:38 -04:00
ioctl.c
Kconfig
Makefile
mballoc.c ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa struct 2014-07-30 22:17:17 -04:00
mballoc.h
migrate.c ext4: add i_data_sem sanity check 2014-07-27 22:28:15 -04:00
mmp.c ext4: make local functions static 2014-05-12 10:50:23 -04:00
move_extent.c ext4: fix incorrect locking in move_extent_per_page 2014-07-27 22:32:27 -04:00
namei.c ext4: reduce contention on s_orphan_lock 2014-05-26 11:56:53 -04:00
page-io.c Clean ups and miscellaneous bug fixes, in particular for the new 2014-06-08 13:03:35 -07:00
resize.c Clean ups and miscellaneous bug fixes, in particular for the new 2014-06-08 13:03:35 -07:00
super.c ext4: rearrange initialization to fix EXT4FS_DEBUG 2014-07-15 06:01:38 -04:00
symlink.c
truncate.h
xattr.c ext4: add missing BUFFER_TRACE before ext4_journal_get_write_access 2014-05-12 22:06:43 -04:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c