diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f49de9e97bf2451baaaaad39d597989a62aa0f57..ce2409ee2144b1d0e3452b9b10a8dc60efa1416f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -813,11 +813,10 @@ static inline struct capture_control *task_capc(struct zone *zone) { struct capture_control *capc = current->capture_control; - return capc && + return unlikely(capc) && !(current->flags & PF_KTHREAD) && !capc->page && - capc->cc->zone == zone && - capc->cc->direct_compaction ? capc : NULL; + capc->cc->zone == zone ? capc : NULL; } static inline bool