aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ioprio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 7da2a06..e325e9f 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -160,8 +160,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;
}