|
@@ -781,24 +781,10 @@ static inline bool __memcg_kmem_bypass(gfp_t gfp)
|
|
{
|
|
{
|
|
if (!memcg_kmem_enabled())
|
|
if (!memcg_kmem_enabled())
|
|
return true;
|
|
return true;
|
|
-
|
|
|
|
if (gfp & __GFP_NOACCOUNT)
|
|
if (gfp & __GFP_NOACCOUNT)
|
|
return true;
|
|
return true;
|
|
- /*
|
|
|
|
- * __GFP_NOFAIL allocations will move on even if charging is not
|
|
|
|
- * possible. Therefore we don't even try, and have this allocation
|
|
|
|
- * unaccounted. We could in theory charge it forcibly, but we hope
|
|
|
|
- * those allocations are rare, and won't be worth the trouble.
|
|
|
|
- */
|
|
|
|
- if (gfp & __GFP_NOFAIL)
|
|
|
|
- return true;
|
|
|
|
if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD))
|
|
if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD))
|
|
return true;
|
|
return true;
|
|
-
|
|
|
|
- /* If the test is dying, just let it go. */
|
|
|
|
- if (unlikely(fatal_signal_pending(current)))
|
|
|
|
- return true;
|
|
|
|
-
|
|
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|