Skip to content

Commit

Permalink
mm: export use_mm/unuse_mm to modules
Browse files Browse the repository at this point in the history
vhost net module wants to do copy to/from user from a kernel thread,
which needs use_mm. Export it to modules.

Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
mstsirkin authored and davem330 committed Jan 15, 2010
1 parent 05c2828 commit 5da779c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mm/mmu_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <linux/mm.h>
#include <linux/mmu_context.h>
#include <linux/module.h>
#include <linux/sched.h>

#include <asm/mmu_context.h>
Expand Down Expand Up @@ -37,6 +38,7 @@ void use_mm(struct mm_struct *mm)
if (active_mm != mm)
mmdrop(active_mm);
}
EXPORT_SYMBOL_GPL(use_mm);

/*
* unuse_mm
Expand All @@ -56,3 +58,4 @@ void unuse_mm(struct mm_struct *mm)
enter_lazy_tlb(mm, tsk);
task_unlock(tsk);
}
EXPORT_SYMBOL_GPL(unuse_mm);

0 comments on commit 5da779c

Please sign in to comment.