Blob Blame History Raw
From 6ea642a5a4866b2dccd31c4b2fb09ebe9927e370 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Wed, 4 Nov 2020 19:29:12 +0100
Subject: [PATCH] kABI: revert use_mm name change.

Patch-mainline: never, kABI
References: MM Functionality, bsc#1178426

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---

--- a/include/linux/mmu_context.h
+++ b/include/linux/mmu_context.h
@@ -6,8 +6,11 @@
 
 struct mm_struct;
 
-void kthread_use_mm(struct mm_struct *mm);
-void kthread_unuse_mm(struct mm_struct *mm);
+void use_mm(struct mm_struct *mm);
+void unuse_mm(struct mm_struct *mm);
+
+static inline void kthread_use_mm(struct mm_struct *mm)     { use_mm(mm); }
+static inline void kthread_unuse_mm(struct mm_struct *mm) { unuse_mm(mm); }
 
 /* Architectures that care about IRQ state in switch_mm can override this. */
 #ifndef switch_mm_irqs_off
--- a/mm/mmu_context.c
+++ b/mm/mmu_context.c
@@ -13,10 +13,10 @@
 #include <asm/mmu_context.h>
 
 /**
- * kthread_use_mm - make the calling kthread operate on an address space
+ * use_mm - make the calling kthread operate on an address space
  * @mm: address space to operate on
  */
-void kthread_use_mm(struct mm_struct *mm)
+void use_mm(struct mm_struct *mm)
 {
 	struct mm_struct *active_mm;
 	struct task_struct *tsk = current;
@@ -43,13 +43,13 @@ void kthread_use_mm(struct mm_struct *mm
 	if (active_mm != mm)
 		mmdrop(active_mm);
 }
-EXPORT_SYMBOL_GPL(kthread_use_mm);
+EXPORT_SYMBOL_GPL(use_mm);
 
 /**
- * kthread_unuse_mm - reverse the effect of kthread_use_mm()
+ * unuse_mm - reverse the effect of use_mm()
  * @mm: address space to operate on
  */
-void kthread_unuse_mm(struct mm_struct *mm)
+void unuse_mm(struct mm_struct *mm)
 {
 	struct task_struct *tsk = current;
 
@@ -65,4 +65,4 @@ void kthread_unuse_mm(struct mm_struct *
 	local_irq_enable();
 	task_unlock(tsk);
 }
-EXPORT_SYMBOL_GPL(kthread_unuse_mm);
+EXPORT_SYMBOL_GPL(unuse_mm);