import PULS_20180308
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / ioprio.c
index e50170ca7c33f446acc16e29a0d0097828919c30..46f0e24f43e99cc0a7efd71a1130797fbf032637 100644 (file)
@@ -149,8 +149,10 @@ static int get_task_ioprio(struct task_struct *p)
        if (ret)
                goto out;
        ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
+       task_lock(p);
        if (p->io_context)
                ret = p->io_context->ioprio;
+       task_unlock(p);
 out:
        return ret;
 }