[PATCH] hugetlbfs i_size fixes
We're expanding hugetlbfs i_size in the wrong place. If someone attempts to mmap more pages than are available, i_size is updated to reflect the attempted mapping size. So set i_size only when pages are successfully added to the mapping. i_size handling at truncate time is still a bit wrong - if the mapping has pages at (say) page offset 100-200 and the mappng is truncated to (say) page offset 50, i_size should be set to zero. But it is instead set to 50*HPAGE_SIZE. That's harmless.
Showing
Please register or sign in to comment