]> git.baikalelectronics.ru Git - kernel.git/commit
ufs_truncate_blocks(): fix the case when size is in the last direct block
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 15 Jun 2017 07:57:46 +0000 (03:57 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 15 Jun 2017 07:57:46 +0000 (03:57 -0400)
commit44ca671b8d55c831b1d302ee5abcba06c49b96be
treefa151e8eb08d478103849e36a65bc350cfe0def1
parent27d781d9bf2f66ab01de98872bdbb0922f7ea547
ufs_truncate_blocks(): fix the case when size is in the last direct block

The logics when deciding whether we need to do anything with direct blocks
is broken when new size is within the last direct block.  It's better to
find the path to the last byte _not_ to be removed and use that instead
of the path to the beginning of the first block to be freed...

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