reiserfs: truncate blocks not used by a write
authorJan Kara <jack@suse.cz>
Thu, 17 Dec 2009 23:27:06 +0000 (15:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Dec 2009 23:45:30 +0000 (15:45 -0800)
commitec8e2f7466ca370f5e09000ca40a71759afc9ac8
tree41c33d2317d9ffb0cc60cdacebf246bc023f8677
parent2bf212b9e48e1c35eaf8f0cc1729d7c4a39b7b5a
reiserfs: truncate blocks not used by a write

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>
fs/reiserfs/inode.c