From b86fe9777dccdd49b0a1ffa4b1c5eea2a5934b9a Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Tue, 25 May 2010 10:16:53 +0200 Subject: [PATCH] --- yaml --- r: 199893 b: refs/heads/master c: d02a2c077fb81f3224c770be62a318165b23b486 h: refs/heads/master i: 199891: b61d403da27a27aec8d6555a56d5586f95cd2a9d v: v3 --- [refs] | 2 +- trunk/block/cfq-iosched.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index aba4a2c92eaa..bf72c0b90d87 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b9598db3401282bb27b4aef77e3eee12015f7f29 +refs/heads/master: d02a2c077fb81f3224c770be62a318165b23b486 diff --git a/trunk/block/cfq-iosched.c b/trunk/block/cfq-iosched.c index c72e5acc573d..5ff4f4850e71 100644 --- a/trunk/block/cfq-iosched.c +++ b/trunk/block/cfq-iosched.c @@ -2560,15 +2560,10 @@ static void cfq_free_io_context(struct io_context *ioc) __call_for_each_cic(ioc, cic_free_func); } -static void cfq_exit_cfqq(struct cfq_data *cfqd, struct cfq_queue *cfqq) +static void cfq_put_cooperator(struct cfq_queue *cfqq) { struct cfq_queue *__cfqq, *next; - if (unlikely(cfqq == cfqd->active_queue)) { - __cfq_slice_expired(cfqd, cfqq, 0); - cfq_schedule_dispatch(cfqd); - } - /* * If this queue was scheduled to merge with another queue, be * sure to drop the reference taken on that queue (and others in @@ -2584,6 +2579,16 @@ static void cfq_exit_cfqq(struct cfq_data *cfqd, struct cfq_queue *cfqq) cfq_put_queue(__cfqq); __cfqq = next; } +} + +static void cfq_exit_cfqq(struct cfq_data *cfqd, struct cfq_queue *cfqq) +{ + if (unlikely(cfqq == cfqd->active_queue)) { + __cfq_slice_expired(cfqd, cfqq, 0); + cfq_schedule_dispatch(cfqd); + } + + cfq_put_cooperator(cfqq); cfq_put_queue(cfqq); } @@ -3536,6 +3541,9 @@ split_cfqq(struct cfq_io_context *cic, struct cfq_queue *cfqq) } cic_set_cfqq(cic, NULL, 1); + + cfq_put_cooperator(cfqq); + cfq_put_queue(cfqq); return NULL; }