[PATCH] dup3 fix
[firefly-linux-kernel-4.4.55.git] / fs / aio.c
index b5253e77eb2f137ee5b1346f848514ad991801e1..0051fd94b44e7e75bde7882b2d9c074a1d1f8188 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -586,15 +586,10 @@ static void use_mm(struct mm_struct *mm)
        struct task_struct *tsk = current;
 
        task_lock(tsk);
-       tsk->flags |= PF_BORROWED_MM;
        active_mm = tsk->active_mm;
        atomic_inc(&mm->mm_count);
        tsk->mm = mm;
        tsk->active_mm = 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
-        */
        switch_mm(active_mm, mm, tsk);
        task_unlock(tsk);
 
@@ -614,7 +609,6 @@ static void unuse_mm(struct mm_struct *mm)
        struct task_struct *tsk = current;
 
        task_lock(tsk);
-       tsk->flags &= ~PF_BORROWED_MM;
        tsk->mm = NULL;
        /* active_mm is still 'mm' */
        enter_lazy_tlb(mm, tsk);