diff options
Diffstat (limited to 'kernel/block/ioprio.c')
-rw-r--r-- | kernel/block/ioprio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/block/ioprio.c b/kernel/block/ioprio.c index cc7800e9e..01b811629 100644 --- a/kernel/block/ioprio.c +++ b/kernel/block/ioprio.c @@ -150,8 +150,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; } |