Skip to content

Commit

Permalink
mm/page_ext: rename offset to index
Browse files Browse the repository at this point in the history
Here, 'offset' means entry index in page_ext array.  Following patch
will use 'offset' for field offset in each entry so rename current
'offset' to prevent confusion.

Link: http://lkml.kernel.org/r/1471315879-32294-5-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
JoonsooKim authored and torvalds committed Oct 8, 2016
1 parent e2f612e commit 0b06bb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/page_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void __meminit pgdat_page_ext_init(struct pglist_data *pgdat)
struct page_ext *lookup_page_ext(struct page *page)
{
unsigned long pfn = page_to_pfn(page);
unsigned long offset;
unsigned long index;
struct page_ext *base;

base = NODE_DATA(page_to_nid(page))->node_page_ext;
Expand All @@ -119,9 +119,9 @@ struct page_ext *lookup_page_ext(struct page *page)
if (unlikely(!base))
return NULL;
#endif
offset = pfn - round_down(node_start_pfn(page_to_nid(page)),
index = pfn - round_down(node_start_pfn(page_to_nid(page)),
MAX_ORDER_NR_PAGES);
return base + offset;
return base + index;
}

static int __init alloc_node_page_ext(int nid)
Expand Down

0 comments on commit 0b06bb3

Please sign in to comment.