summaryrefslogtreecommitdiffstats
path: root/fs/ext3/resize.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-12-01 16:53:06 +0100
committerJan Kara <jack@suse.cz>2009-12-10 15:02:55 +0100
commit68eb3db08344286733adac48304d9fb7a0e53b27 (patch)
tree214133860fdb6ceac4adbeb621837df8c494f1fb /fs/ext3/resize.c
parentext4: Support for 64-bit quota format (diff)
downloadlinux-68eb3db08344286733adac48304d9fb7a0e53b27.tar.xz
linux-68eb3db08344286733adac48304d9fb7a0e53b27.zip
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>
Diffstat (limited to 'fs/ext3/resize.c')
0 files changed, 0 insertions, 0 deletions