diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 56776b726d3371fe8f4e17a448fdc0d5ac274ff9..96c5f4c5ee6e4f682805060ea8ea4aa4161143f9 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -655,7 +655,7 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset, * as well as being converted to page offsets. */ start = offset >> hpage_shift; - end = (offset + len + hpage_size - 1) >> hpage_shift; + end = DIV_ROUND_UP_ULL(offset + len, hpage_size); inode_lock(inode);