Skip to content

Commit

Permalink
[PATCH] Use activate_mm() in fs/aio.c:use_mm()
Browse files Browse the repository at this point in the history
activate_mm() is not the right thing to be using in use_mm().  It should be
switch_mm().

On normal x86, they're synonymous, but for the Xen patches I'm adding a
hook which assumes that activate_mm is only used the first time a new mm
is used after creation (I have another hook for dealing with dup_mm).  I
think this use of activate_mm() is the only place where it could be used
a second time on an mm.

>From a quick look at the other architectures I think this is OK (most
simply implement one in terms of the other), but some are doing some
subtly different stuff between the two.

Acked-by: David Miller <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jsgf authored and Linus Torvalds committed Dec 13, 2006
1 parent 74c383f commit 90aef12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ static void use_mm(struct mm_struct *mm)
* Note that on UML this *requires* PF_BORROWED_MM to be set, otherwise
* it won't work. Update it accordingly if you change it here
*/
activate_mm(active_mm, mm);
switch_mm(active_mm, mm, tsk);
task_unlock(tsk);

mmdrop(active_mm);
Expand Down

0 comments on commit 90aef12

Please sign in to comment.