aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorfaux123 <reioux@gmail.com>2012-02-07 01:01:11 -0800
committerZiyan <jaraidaniel@gmail.com>2016-01-08 10:36:55 +0100
commitfd8bb5cb21e5b0d1c04a18a86b2435585d15b9e3 (patch)
treea2fed0eb7202872a905d84ddc2b8e55485daf396 /block
parenta6255d07fe24a06019d6960d5d9525bebc4f381c (diff)
downloadkernel_samsung_tuna-fd8bb5cb21e5b0d1c04a18a86b2435585d15b9e3.zip
kernel_samsung_tuna-fd8bb5cb21e5b0d1c04a18a86b2435585d15b9e3.tar.gz
kernel_samsung_tuna-fd8bb5cb21e5b0d1c04a18a86b2435585d15b9e3.tar.bz2
block: fix merge error from "block, cfq: move ioc ioprio/cgroup changed
handling to cic"
Diffstat (limited to 'block')
-rw-r--r--block/blk-ioc.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 384d6e4..7bbfe03 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -104,22 +104,18 @@ static struct io_context *create_task_io_context(struct task_struct *task,
{
struct io_context *ioc;
- ioc = kmem_cache_alloc_node(iocontext_cachep, gfp_flags, node);
- if (ioc) {
- atomic_long_set(&ioc->refcount, 1);
- atomic_set(&ioc->nr_tasks, 1);
- spin_lock_init(&ioc->lock);
- ioc->ioprio_changed = 0;
- ioc->ioprio = 0;
- ioc->last_waited = 0; /* doesn't matter... */
- ioc->nr_batch_requests = 0; /* because this is 0 */
- INIT_RADIX_TREE(&ioc->radix_root, GFP_ATOMIC | __GFP_HIGH);
- INIT_HLIST_HEAD(&ioc->cic_list);
- ioc->ioc_data = NULL;
-#if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE)
- ioc->cgroup_changed = 0;
-#endif
- }
+ ioc = kmem_cache_alloc_node(iocontext_cachep, gfp_flags | __GFP_ZERO,
+ node);
+
+ if (unlikely(!ioc))
+ return NULL;
+
+ /* initialize */
+ atomic_long_set(&ioc->refcount, 1);
+ atomic_set(&ioc->nr_tasks, 1);
+ spin_lock_init(&ioc->lock);
+ INIT_RADIX_TREE(&ioc->radix_root, GFP_ATOMIC | __GFP_HIGH);
+ INIT_HLIST_HEAD(&ioc->cic_list);
/* try to install, somebody might already have beaten us to it */
task_lock(task);