• Andrew Morton's avatar
    [PATCH] hugetlbfs i_size fixes · 05732657
    Andrew Morton authored
    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.
    05732657
inode.c 14.4 KB