Provided by: linux-doc-2.6.15_2.6.15-23.39_all bug


       truncate_inode_pages - truncate *all* the pages from an offset


       void truncate_inode_pages  (struct address_space * mapping,
                                    loff_t lstart);


              mapping to truncate

       lstart offset from which to truncate


       Truncate the page cache at a set offset, removing the  pages  that  are
       beyond that offset (and zeroing out partial pages).

       Truncate  takes two passes - the first pass is nonblocking. It will not
       block on page locks and it will not block on writeback. The second pass
       will  wait.  This  is to prevent as much IO as possible in the affected
       region. The first pass will remove most pages, so the  search  cost  of
       the second pass is low.

       When looking at page->index outside the page lock we need to be careful
       to copy it into a local to avoid races (it could change at any time).

       We pass down the cache-hot hint to the page freeing code. Even  if  the
       mapping  is large, it is probably the case that the final pages are the
       most recently touched, and freeing happens  in  ascending  file  offset

       Called under (and serialised by) inode->i_sem.