diff mbox series

mm/slub: Replace do_slab_free() local_lock_irqsave/restore() calls in PREEMPT_RT scope

Message ID b9b2dbb062bd25d9f6c0b918c3c834bc6964c2d6.camel@gmx.de
State New
Headers show
Series mm/slub: Replace do_slab_free() local_lock_irqsave/restore() calls in PREEMPT_RT scope | expand

Commit Message

Mike Galbraith July 9, 2021, 5:20 a.m. UTC
IRQ affecting local lock operations are intended for dual RT/!RT scope,
only affect IRQs in !RT scope.  Replace misplaced do_slab_free() calls
with plain local_lock()/local_unlock().  Purely cosmetic.

Signed-off-by: Mike Galbraith <efault@gmx.de>
---
 mm/slub.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3362,13 +3362,12 @@  static __always_inline void do_slab_free
 		 * we need to take the local_lock. We shouldn't simply defer to
 		 * __slab_free() as that wouldn't use the cpu freelist at all.
 		 */
-		unsigned long flags;
 		void **freelist;

-		local_lock_irqsave(&s->cpu_slab->lock, flags);
+		local_lock(&s->cpu_slab->lock);
 		c = this_cpu_ptr(s->cpu_slab);
 		if (unlikely(page != c->page)) {
-			local_unlock_irqrestore(&s->cpu_slab->lock, flags);
+			local_unlock(&s->cpu_slab->lock);
 			goto redo;
 		}
 		tid = c->tid;
@@ -3378,7 +3377,7 @@  static __always_inline void do_slab_free
 		c->freelist = head;
 		c->tid = next_tid(tid);

-		local_unlock_irqrestore(&s->cpu_slab->lock, flags);
+		local_unlock(&s->cpu_slab->lock);
 #endif
 		stat(s, FREE_FASTPATH);
 	} else