Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a3135c2e77fe88cdea20b5e3f4761068b799ac2 Commit: 5a3135c2e77fe88cdea20b5e3f4761068b799ac2 Parent: 4ba9b9d0ba0a49d91fa6417c7510ee36f48cf957 Author: David Rientjes <[EMAIL PROTECTED]> AuthorDate: Tue Oct 16 23:25:53 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed Oct 17 08:42:45 2007 -0700
oom: move prototypes to appropriate header file Move the OOM killer's extern function prototypes to include/linux/oom.h and include it where necessary. [EMAIL PROTECTED]: build fix] Cc: Andrea Arcangeli <[EMAIL PROTECTED]> Acked-by: Christoph Lameter <[EMAIL PROTECTED]> Signed-off-by: David Rientjes <[EMAIL PROTECTED]> Signed-off-by: Cedric Le Goater <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/s390/mm/cmm.c | 1 + drivers/char/sysrq.c | 1 + include/linux/oom.h | 11 ++++++++++- include/linux/swap.h | 5 ----- mm/page_alloc.c | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index fabc50a..d4ed93d 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -17,6 +17,7 @@ #include <linux/ctype.h> #include <linux/swap.h> #include <linux/kthread.h> +#include <linux/oom.h> #include <asm/pgalloc.h> #include <asm/uaccess.h> diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 39cc318..179fa36 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -36,6 +36,7 @@ #include <linux/kexec.h> #include <linux/irq.h> #include <linux/hrtimer.h> +#include <linux/oom.h> #include <asm/ptrace.h> #include <asm/irq_regs.h> diff --git a/include/linux/oom.h b/include/linux/oom.h index ad76463..b40bb4e 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h @@ -1,10 +1,19 @@ #ifndef __INCLUDE_LINUX_OOM_H #define __INCLUDE_LINUX_OOM_H +#include <linux/sched.h> + /* /proc/<pid>/oom_adj set to -17 protects from the oom-killer */ #define OOM_DISABLE (-17) /* inclusive */ #define OOM_ADJUST_MIN (-16) #define OOM_ADJUST_MAX 15 -#endif +#ifdef __KERNEL__ + +extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); +extern int register_oom_notifier(struct notifier_block *nb); +extern int unregister_oom_notifier(struct notifier_block *nb); + +#endif /* __KERNEL__*/ +#endif /* _INCLUDE_LINUX_OOM_H */ diff --git a/include/linux/swap.h b/include/linux/swap.h index edf681a..4f3838a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -158,11 +158,6 @@ struct swap_list_t { /* Swap 50% full? Release swapcache more aggressively.. */ #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) -/* linux/mm/oom_kill.c */ -extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); -extern int register_oom_notifier(struct notifier_block *nb); -extern int unregister_oom_notifier(struct notifier_block *nb); - /* linux/mm/memory.c */ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d315e11..0e3a05f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -27,6 +27,7 @@ #include <linux/pagevec.h> #include <linux/blkdev.h> #include <linux/slab.h> +#include <linux/oom.h> #include <linux/notifier.h> #include <linux/topology.h> #include <linux/sysctl.h> - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html