1
linux/fs/ext3
Jan Kara 68eb3db083 ext3: Fix data / filesystem corruption when write fails to copy data
When ext3_write_begin fails after allocating some blocks or
generic_perform_write fails to copy data to write, we truncate blocks already
instantiated beyond i_size. Although these blocks were never inside i_size, we
have to truncate pagecache of these blocks so that corresponding buffers get
unmapped. Otherwise subsequent __block_prepare_write (called because we are
retrying the write) will find the buffers mapped, not call ->get_block, and
thus the page will be backed by already freed blocks leading to filesystem and
data corruption.

Reported-by: James Y Knight <foom@fuhm.net>
Signed-off-by: Jan Kara <jack@suse.cz>
2009-12-10 15:02:55 +01:00
..
acl.c ext[234]: move over to 'check_acl' permission model 2009-09-08 11:09:04 -07:00
acl.h ext[234]: move over to 'check_acl' permission model 2009-09-08 11:09:04 -07:00
balloc.c ext3: remove ->write_super and stop maintaining ->s_dirt 2009-06-11 21:36:05 -04:00
bitmap.c
dir.c ext3: Get rid of extenddisksize parameter of ext3_get_blocks_handle() 2009-07-15 21:30:46 +02:00
ext3_jbd.c
file.c ext3: Remove syncing logic from ext3_file_write 2009-09-14 17:08:16 +02:00
fsync.c ext3: Wait for proper transaction commit on fsync 2009-11-11 15:22:49 +01:00
hash.c ext3: Add support for non-native signed/unsigned htree hash algorithms 2008-10-28 13:21:55 -04:00
ialloc.c ext3: remove ->write_super and stop maintaining ->s_dirt 2009-06-11 21:36:05 -04:00
inode.c ext3: Fix data / filesystem corruption when write fails to copy data 2009-12-10 15:02:55 +01:00
ioctl.c ext3: remove the BKL in ext3/ioctl.c 2009-04-02 19:04:52 -07:00
Kconfig ext3: Update Kconfig description of EXT3_DEFAULTS_TO_ORDERED 2009-08-24 16:48:32 +02:00
Makefile
namei.c ext[234]: move over to 'check_acl' permission model 2009-09-08 11:09:04 -07:00
namei.h
resize.c block: rename CONFIG_LBD to CONFIG_LBDAF 2009-06-19 08:08:50 +02:00
super.c ext3: Support for vfsv1 quota format 2009-12-10 15:02:54 +01:00
symlink.c
xattr_security.c
xattr_trusted.c
xattr_user.c
xattr.c ext3: journal all modifications in ext3_xattr_set_handle 2009-12-10 15:02:52 +01:00
xattr.h