]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
reiserfs: truncate blocks not used by a write
authorJan Kara <jack@suse.cz>
Thu, 17 Dec 2009 23:27:06 +0000 (15:27 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:20:19 +0000 (15:20 -0800)
commitb3f881085c970a6c59d3e594e58278a4a00122da
treee1dcc8ad35512fec1ca1aa37ff13069124c541fe
parent5051769bea011902cf5f76c92bbb33accb015306
reiserfs: truncate blocks not used by a write

commit ec8e2f7466ca370f5e09000ca40a71759afc9ac8 upstream.

It can happen that write does not use all the blocks allocated in
write_begin either because of some filesystem error (like ENOSPC) or
because page with data to write has been removed from memory.  We truncate
these blocks so that we don't have dangling blocks beyond i_size.

Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/reiserfs/inode.c