]> git.karo-electronics.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, 1 Apr 2010 22:55:34 +0000 (15:55 -0700)
commit954eec71d4436334622f2549d647c036a8763828
tree92eccbe1078469a390694bde310f960d2fa86405
parent5cae244ff0fa273001a56e2ce62cd18ff2b6d5a3
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