Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0da7e01f5f37f441cccd7c8c0586e06db0981907
Commit:     0da7e01f5f37f441cccd7c8c0586e06db0981907
Parent:     2408c55037c3f7d51a8a100025c47595e71b838c
Author:     Dean Nelson <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:24:45 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:42:53 2007 -0700

    calculation of pgoff in do_linear_fault() uses mixed units
    
    The calculation of pgoff in do_linear_fault() should use PAGE_SHIFT and not
    PAGE_CACHE_SHIFT since vma->vm_pgoff is in units of PAGE_SIZE and not
    PAGE_CACHE_SIZE.  At the moment linux/pagemap.h has PAGE_CACHE_SHIFT
    defined as PAGE_SHIFT, but should that ever change this calculation would
    break.
    
    Signed-off-by: Dean Nelson <[EMAIL PROTECTED]>
    Acked-by: Nick Piggin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/memory.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 2a84308..b3c42f0 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2361,7 +2361,7 @@ static int do_linear_fault(struct mm_struct *mm, struct 
vm_area_struct *vma,
                int write_access, pte_t orig_pte)
 {
        pgoff_t pgoff = (((address & PAGE_MASK)
-                       - vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff;
+                       - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
        unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0);
 
        pte_unmap(page_table);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to