]> git.karo-electronics.de Git - linux-beck.git/commit
__ufs_truncate_blocks(): avoid excessive dirtying of indirect blocks
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 19 Jun 2015 00:17:32 +0000 (20:17 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 6 Jul 2015 21:39:51 +0000 (17:39 -0400)
commitf53bd1421b3eb84375e9e6964665d23d4190400d
tree15abaa510b8bf935c856cd8537ff1ba3e6036f5c
parentcc7231e30916f5326bdde55a7a4c59431e15bc1b
__ufs_truncate_blocks(): avoid excessive dirtying of indirect blocks

There's a case when an indirect block gets dirtied for no good
reason - when there's a hole starting in the middle of area
covered by it and spanning past its end, and truncate() is done
precisely to the beginning of the hole.

The block is obviously not modified at all - all removals happen
beyond it.  However, existing code ends up dirtying it just in
case.  It's trivial to fix and while it's not a real bug by any
stretch of imagination, it makes the damn thing harder to follow.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ufs/inode.c