tux3: Fix tux3_truncate_inode_pages_range() overflow handling

At 3.11, truncate_inode_pages_range() was changed to support partial
page range. But it doesn't handle corner cases correctly.

loff_t is signed, so loff_t >> shift_bits is invalid operation.
So, we have to care loff_t doesn't overflow signed.

This assumes loff_t >> PAGE_CACHE_SHIFT doesn't overflow pgoff_t (this
is true if loff_t < MAX_LFS_FILESIZE).

With this assumption, this fix overflow cases by just casting to (u64).

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
2 files changed