On Wed, Nov 28, 2007 at 05:10:57PM -0800, Christoph Lameter wrote: > Use page_cache_xxx in mm/rmap.c > > Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> > --- > mm/rmap.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > Index: mm/mm/rmap.c > =================================================================== > --- mm.orig/mm/rmap.c 2007-11-28 12:27:32.312059099 -0800 > +++ mm/mm/rmap.c 2007-11-28 14:10:42.758227810 -0800 > @@ -190,9 +190,14 @@ static void page_unlock_anon_vma(struct > static inline unsigned long > vma_address(struct page *page, struct vm_area_struct *vma) > { > - pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); > + pgoff_t pgoff; > unsigned long address; > > + if (PageAnon(page)) > + pgoff = page->index; > + else > + pgoff = page->index << mapping_order(page->mapping); > + > address = vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); > if (unlikely(address < vma->vm_start || address >= vma->vm_end)) { > /* page should be within @vma mapping range */ > @@ -345,7 +350,7 @@ static int page_referenced_file(struct p > { > unsigned int mapcount; > struct address_space *mapping = page->mapping; > - pgoff_t pgoff = page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); > + pgoff_t pgoff = page->index << (page_cache_shift(mapping) - PAGE_SHIFT);
Based on the first hunk, shouldn't this be: pgoff_t pgoff = page->index << mapping_order(mapping); Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html