summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/erase.c
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2007-05-06 14:49:21 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 12:12:52 -0700
commit826fad1b93fdb4ffacfd9cd860f06140e852e377 (patch)
tree8135bd60f839a83521d457904e4d2578203df339 /fs/jffs2/erase.c
parent0013572b2ae535bfd6314f22d9aef53725ea00d8 (diff)
downloadtalos-op-linux-826fad1b93fdb4ffacfd9cd860f06140e852e377.tar.gz
talos-op-linux-826fad1b93fdb4ffacfd9cd860f06140e852e377.zip
smaps: extract pmd walker from smaps code
Extracts the pmd walker from smaps-specific code in fs/proc/task_mmu.c. The new struct pmd_walker includes the struct vm_area_struct of the memory to walk over. Iteration begins at the vma->vm_start and completes at vma->vm_end. A pointer to another data structure may be stored in the private field such as struct mem_size_stats, which acts as the smaps accumulator. For each pmd in the VMA, the action function is called with a pointer to its struct vm_area_struct, a pointer to the pmd_t, its start and end addresses, and the private field. The interface for walking pmd's in a VMA for fs/proc/task_mmu.c is now: void for_each_pmd(struct vm_area_struct *vma, void (*action)(struct vm_area_struct *vma, pmd_t *pmd, unsigned long addr, unsigned long end, void *private), void *private); Since the pmd walker is now extracted from the smaps code, smaps_one_pmd() is invoked for each pmd in the VMA. Its behavior and efficiency is identical to the existing implementation. Cc: Hugh Dickins <hugh@veritas.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Christoph Lameter <clameter@sgi.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jffs2/erase.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud