Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
This commit is contained in:
@@ -32,16 +32,16 @@ void free_thread_xstate(struct task_struct *tsk)
|
||||
#if THREAD_SHIFT < PAGE_SHIFT
|
||||
static struct kmem_cache *thread_info_cache;
|
||||
|
||||
struct thread_info *alloc_thread_info(struct task_struct *tsk)
|
||||
struct thread_info *alloc_thread_info(struct task_struct *tsk, int node)
|
||||
{
|
||||
struct thread_info *ti;
|
||||
|
||||
ti = kmem_cache_alloc(thread_info_cache, GFP_KERNEL);
|
||||
if (unlikely(ti == NULL))
|
||||
return NULL;
|
||||
#ifdef CONFIG_DEBUG_STACK_USAGE
|
||||
memset(ti, 0, THREAD_SIZE);
|
||||
gfp_t mask = GFP_KERNEL | __GFP_ZERO;
|
||||
#else
|
||||
gfp_t mask = GFP_KERNEL;
|
||||
#endif
|
||||
|
||||
ti = kmem_cache_alloc_node(thread_info_cache, mask, node);
|
||||
return ti;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,9 @@ struct thread_info *alloc_thread_info(struct task_struct *tsk)
|
||||
#else
|
||||
gfp_t mask = GFP_KERNEL;
|
||||
#endif
|
||||
return (struct thread_info *)__get_free_pages(mask, THREAD_SIZE_ORDER);
|
||||
struct page *page = alloc_pages_node(node, mask, THREAD_SIZE_ORDER);
|
||||
|
||||
return page ? page_address(page) : NULL;
|
||||
}
|
||||
|
||||
void free_thread_info(struct thread_info *ti)
|
||||
|
Reference in New Issue
Block a user