6.1: glitched-base fixups for current

Fixes https://github.com/Frogging-Family/linux-tkg/issues/824
This commit is contained in:
Tk-Glitch
2023-10-26 03:59:56 +02:00
parent b30f072867
commit 2f482b4904

View File

@@ -770,7 +770,7 @@ diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a0b0397e29ee4c..87a983a356530c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3119,15 +3119,16 @@ __rmqueue(struct zone *zone, unsigned int order, int migratetype,
@@ -3118,15 +3119,16 @@ __rmqueue(struct zone *zone, unsigned int order, int migratetype,
}
/*
@@ -785,12 +785,13 @@ index a0b0397e29ee4c..87a983a356530c 100644
unsigned long count, struct list_head *list,
int migratetype, unsigned int alloc_flags)
{
unsigned long flags;
- int i, allocated = 0;
+ const bool can_resched = !preempt_count() && !irqs_disabled();
+ int i, allocated = 0, last_mod = 0;
/* Caller must hold IRQ-safe pcp->lock so IRQs are disabled. */
spin_lock(&zone->lock);
spin_lock_irqsave(&zone->lock, flags);
for (i = 0; i < count; ++i) {
@@ -3137,6 +3138,18 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
if (unlikely(page == NULL))
break;
@@ -819,3 +820,4 @@ index a0b0397e29ee4c..87a983a356530c 100644
spin_unlock(&zone->lock);
return allocated;
}