diff options
author | Matt Mackall <mpm@selenic.com> | 2008-12-09 16:14:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-10 11:01:53 -0500 |
commit | 49c50342c728344b79c8f9e8293637fe80ef5ad5 (patch) | |
tree | dec4b310b517d03b62181725026e85bb0cdcc2a0 /fs | |
parent | 653d22c0f5c41496c0e949ef5d141ab37c0b0580 (diff) |
pagemap: fix 32-bit pagemap regression
The large pages fix from bcf8039ed45 broke 32-bit pagemap by pulling the
pagemap entry code out into a function with the wrong return type.
Pagemap entries are 64 bits on all systems and unsigned long is only 32
bits on 32-bit systems.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Reported-by: Doug Graham <dgraham@nortel.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: <stable@kernel.org> [2.6.26.x, 2.6.27.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/task_mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index b770c095e45c..3a8bdd7f5756 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -557,9 +557,9 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte) | |||
557 | return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT); | 557 | return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT); |
558 | } | 558 | } |
559 | 559 | ||
560 | static unsigned long pte_to_pagemap_entry(pte_t pte) | 560 | static u64 pte_to_pagemap_entry(pte_t pte) |
561 | { | 561 | { |
562 | unsigned long pme = 0; | 562 | u64 pme = 0; |
563 | if (is_swap_pte(pte)) | 563 | if (is_swap_pte(pte)) |
564 | pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte)) | 564 | pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte)) |
565 | | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP; | 565 | | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP; |