On 2013/9/10 4:22, David Rientjes wrote: > On Mon, 9 Sep 2013, Qiang Huang wrote: > >> diff --git a/include/linux/oom.h b/include/linux/oom.h >> index da60007..d061c63 100644 >> --- a/include/linux/oom.h >> +++ b/include/linux/oom.h >> @@ -82,6 +82,11 @@ static inline void oom_killer_enable(void) >> oom_killer_disabled = false; >> } >> >> +static inline bool may_oom(gfp_t gfp_mask) > > Makes sense, but I think the name should be more specific to gfp flags to > make it clear what it's using to determine eligibility, maybe oom_gfp_allowed()? > We usually prefix oom killer functions with "oom". Yes, oom_gfp_allowed() seems better, I'll send a second version, thanks for you advice, David. > > Nice taste. > >> +{ >> + return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY); >> +} >> + >> extern struct task_struct *find_lock_task_mm(struct task_struct *p); >> >> /* sysctls */ > > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>