aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-15 15:24:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-15 15:24:45 -0500
commitb3c9dd182ed3bdcdaf0e42625a35924b0497afdc (patch)
treead48ad4d923fee147c736318d0fad35b3755f4f5 /kernel/fork.c
parent83c2f912b43c3a7babbb6cb7ae2a5276c1ed2a3e (diff)
parent5d381efb3d1f1ef10535a31ca0dd9b22fe1e1922 (diff)
Merge branch 'for-3.3/core' of git://git.kernel.dk/linux-block
* 'for-3.3/core' of git://git.kernel.dk/linux-block: (37 commits) Revert "block: recursive merge requests" block: Stop using macro stubs for the bio data integrity calls blockdev: convert some macros to static inlines fs: remove unneeded plug in mpage_readpages() block: Add BLKROTATIONAL ioctl block: Introduce blk_set_stacking_limits function block: remove WARN_ON_ONCE() in exit_io_context() block: an exiting task should be allowed to create io_context block: ioc_cgroup_changed() needs to be exported block: recursive merge requests block, cfq: fix empty queue crash caused by request merge block, cfq: move icq creation and rq->elv.icq association to block core block, cfq: restructure io_cq creation path for io_context interface cleanup block, cfq: move io_cq exit/release to blk-ioc.c block, cfq: move icq cache management to block core block, cfq: move io_cq lookup to blk-ioc.c block, cfq: move cfqd->icq_list to request_queue and add request->elv.icq block, cfq: reorganize cfq_io_context into generic and cfq specific parts block: remove elevator_queue->ops block: reorder elevator switch sequence ... Fix up conflicts in: - block/blk-cgroup.c Switch from can_attach_task to can_attach - block/cfq-iosched.c conflict with now removed cic index changes (we now use q->id instead)
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 443f5125f11..f3fa18887cc 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -873,6 +873,7 @@ static int copy_io(unsigned long clone_flags, struct task_struct *tsk)
873{ 873{
874#ifdef CONFIG_BLOCK 874#ifdef CONFIG_BLOCK
875 struct io_context *ioc = current->io_context; 875 struct io_context *ioc = current->io_context;
876 struct io_context *new_ioc;
876 877
877 if (!ioc) 878 if (!ioc)
878 return 0; 879 return 0;
@@ -884,11 +885,12 @@ static int copy_io(unsigned long clone_flags, struct task_struct *tsk)
884 if (unlikely(!tsk->io_context)) 885 if (unlikely(!tsk->io_context))
885 return -ENOMEM; 886 return -ENOMEM;
886 } else if (ioprio_valid(ioc->ioprio)) { 887 } else if (ioprio_valid(ioc->ioprio)) {
887 tsk->io_context = alloc_io_context(GFP_KERNEL, -1); 888 new_ioc = get_task_io_context(tsk, GFP_KERNEL, NUMA_NO_NODE);
888 if (unlikely(!tsk->io_context)) 889 if (unlikely(!new_ioc))
889 return -ENOMEM; 890 return -ENOMEM;
890 891
891 tsk->io_context->ioprio = ioc->ioprio; 892 new_ioc->ioprio = ioc->ioprio;
893 put_io_context(new_ioc, NULL);
892 } 894 }
893#endif 895#endif
894 return 0; 896 return 0;