summaryrefslogtreecommitdiff
path: root/lib/nlattr.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2011-07-26 04:12:09 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 07:57:08 +0400
commit6c6d5280431544e4036886ea74e3334a98bc5f96 (patch)
tree1362944d254ff1dfa609d84a1e4182a77ce3ca07 /lib/nlattr.c
parent4b6ddbf7ed4ef2f40e0a27418146eedaa68953c6 (diff)
downloadlinux-6c6d5280431544e4036886ea74e3334a98bc5f96.tar.xz
pagewalk: don't look up vma if walk->hugetlb_entry is unused
Currently, walk_page_range() calls find_vma() every page table for walk iteration. but it's completely unnecessary if walk->hugetlb_entry is unused. And we don't have to assume find_vma() is a lightweight operation. So this patch checks the walk->hugetlb_entry and avoids the find_vma() call if possible. This patch also makes some cleanups. 1) remove ugly uninitialized_var() and 2) #ifdef in function body. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/nlattr.c')
0 files changed, 0 insertions, 0 deletions