提交 5da779c3 编写于 作者: M Michael S. Tsirkin 提交者: David S. Miller

mm: export use_mm/unuse_mm to modules

vhost net module wants to do copy to/from user from a kernel thread,
which needs use_mm. Export it to modules.
Acked-by: NAndrea Arcangeli <aarcange@redhat.com>
Acked-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 05c2828c
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/mmu_context.h> #include <linux/mmu_context.h>
#include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
...@@ -37,6 +38,7 @@ void use_mm(struct mm_struct *mm) ...@@ -37,6 +38,7 @@ void use_mm(struct mm_struct *mm)
if (active_mm != mm) if (active_mm != mm)
mmdrop(active_mm); mmdrop(active_mm);
} }
EXPORT_SYMBOL_GPL(use_mm);
/* /*
* unuse_mm * unuse_mm
...@@ -56,3 +58,4 @@ void unuse_mm(struct mm_struct *mm) ...@@ -56,3 +58,4 @@ void unuse_mm(struct mm_struct *mm)
enter_lazy_tlb(mm, tsk); enter_lazy_tlb(mm, tsk);
task_unlock(tsk); task_unlock(tsk);
} }
EXPORT_SYMBOL_GPL(unuse_mm);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册