summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/blk-ioc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 71c3a933cf16..11f49f78db32 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -284,12 +284,10 @@ int set_task_ioprio(struct task_struct *task, int ioprio)
kmem_cache_free(iocontext_cachep, ioc);
goto out;
}
- if (task->io_context) {
+ if (task->io_context)
kmem_cache_free(iocontext_cachep, ioc);
- ioc = task->io_context;
- } else {
+ else
task->io_context = ioc;
- }
}
task->io_context->ioprio = ioprio;
out: