mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
Revert "sched: Add a generic notifier when a task struct is about to be freed"
This reverts commit 9e6cb2f4db.
This commit is contained in:
parent
d7473f13a3
commit
496721f1c2
|
|
@ -1724,9 +1724,6 @@ extern cputime_t task_utime(struct task_struct *p);
|
|||
extern cputime_t task_stime(struct task_struct *p);
|
||||
extern cputime_t task_gtime(struct task_struct *p);
|
||||
|
||||
extern int task_free_register(struct notifier_block *n);
|
||||
extern int task_free_unregister(struct notifier_block *n);
|
||||
|
||||
/*
|
||||
* Per process flags
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -138,9 +138,6 @@ struct kmem_cache *vm_area_cachep;
|
|||
/* SLAB cache for mm_struct structures (tsk->mm) */
|
||||
static struct kmem_cache *mm_cachep;
|
||||
|
||||
/* Notifier list called when a task struct is freed */
|
||||
static ATOMIC_NOTIFIER_HEAD(task_free_notifier);
|
||||
|
||||
static void account_kernel_stack(struct thread_info *ti, int account)
|
||||
{
|
||||
struct zone *zone = page_zone(virt_to_page(ti));
|
||||
|
|
@ -159,18 +156,6 @@ void free_task(struct task_struct *tsk)
|
|||
}
|
||||
EXPORT_SYMBOL(free_task);
|
||||
|
||||
int task_free_register(struct notifier_block *n)
|
||||
{
|
||||
return atomic_notifier_chain_register(&task_free_notifier, n);
|
||||
}
|
||||
EXPORT_SYMBOL(task_free_register);
|
||||
|
||||
int task_free_unregister(struct notifier_block *n)
|
||||
{
|
||||
return atomic_notifier_chain_unregister(&task_free_notifier, n);
|
||||
}
|
||||
EXPORT_SYMBOL(task_free_unregister);
|
||||
|
||||
void __put_task_struct(struct task_struct *tsk)
|
||||
{
|
||||
WARN_ON(!tsk->exit_state);
|
||||
|
|
@ -180,7 +165,6 @@ void __put_task_struct(struct task_struct *tsk)
|
|||
exit_creds(tsk);
|
||||
delayacct_tsk_free(tsk);
|
||||
|
||||
atomic_notifier_call_chain(&task_free_notifier, 0, tsk);
|
||||
if (!profile_handoff_task(tsk))
|
||||
free_task(tsk);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user