Skip to content

Commit

Permalink
mm/internal.h: use nth_page
Browse files Browse the repository at this point in the history
Use nth_page instead of pfn_to_page(page_to_pfn

Signed-off-by: Fabian Frederick <[email protected]>
Cc: Rik van Riel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Aug 7, 2014
1 parent 7be12fc commit bc7f84c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static inline void mlock_migrate_page(struct page *new, struct page *old) { }
static inline struct page *mem_map_offset(struct page *base, int offset)
{
if (unlikely(offset >= MAX_ORDER_NR_PAGES))
return pfn_to_page(page_to_pfn(base) + offset);
return nth_page(base, offset);
return base + offset;
}

Expand Down

0 comments on commit bc7f84c

Please sign in to comment.