Skip to content

Commit

Permalink
x86, mm, trivial: Remove unnecessary get_order() in free_thread_info()
Browse files Browse the repository at this point in the history
Because THREAD_SIZE is defined as PAGE_SIZE << THREAD_ORDER on x86, the
call of get_order(THREAD_SIZE) can be replaced with THREAD_ORDER.

Signed-off-by: Zhao Jin <cronozhj@gmail.com>
Link: http://lkml.kernel.org/r/4E4FB5A9.700@gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Zhao Jin authored and Ingo Molnar committed Aug 23, 2011
1 parent 7a4e8be commit c812d8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void free_thread_xstate(struct task_struct *tsk)
void free_thread_info(struct thread_info *ti)
{
free_thread_xstate(ti->task);
free_pages((unsigned long)ti, get_order(THREAD_SIZE));
free_pages((unsigned long)ti, THREAD_ORDER);
}

void arch_task_cache_init(void)
Expand Down

0 comments on commit c812d8f

Please sign in to comment.