summaryrefslogtreecommitdiff
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 12:18:43 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-06 12:18:43 (GMT)
commitb35009a9a7e44fd009717b6e3f29e7043dfb29ca (patch)
tree5d2e7f27f0620f8a54d12b8d051d04032852115a /block/cfq-iosched.c
parent194ed21925032b366e693373ba9bde62fbbf16ed (diff)
parent805a6af8dba5dfdd35ec35dc52ec0122400b2610 (diff)
downloadlinux-b35009a9a7e44fd009717b6e3f29e7043dfb29ca.tar.xz
Merge tag 'v3.2' into staging/for_v3.3
* tag 'v3.2': (83 commits) Linux 3.2 minixfs: misplaced checks lead to dentry leak ptrace: ensure JOBCTL_STOP_SIGMASK is not zero after detach ptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE race Revert "rtc: Expire alarms after the time is set." [CIFS] default ntlmv2 for cifs mount delayed to 3.3 cifs: fix bad buffer length check in coalesce_t2 Revert "rtc: Disable the alarm in the hardware" hung_task: fix false positive during vfork security: Fix security_old_inode_init_security() when CONFIG_SECURITY is not set fix CAN MAINTAINERS SCM tree type mwifiex: fix crash during simultaneous scan and connect b43: fix regression in PIO case ath9k: Fix kernel panic in AR2427 in AP mode CAN MAINTAINERS update net: fsl: fec: fix build for mx23-only kernel sch_qfq: fix overflow in qfq_update_start() drm/radeon/kms/atom: fix possible segfault in pm setup gspca: Fix falling back to lower isoc alt settings futex: Fix uninterruptible loop due to gate_area ...
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 4c12869..3548705 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1655,6 +1655,8 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
struct request *next)
{
struct cfq_queue *cfqq = RQ_CFQQ(rq);
+ struct cfq_data *cfqd = q->elevator->elevator_data;
+
/*
* reposition in fifo if next is older than rq
*/
@@ -1669,6 +1671,16 @@ cfq_merged_requests(struct request_queue *q, struct request *rq,
cfq_remove_request(next);
cfq_blkiocg_update_io_merged_stats(&(RQ_CFQG(rq))->blkg,
rq_data_dir(next), rq_is_sync(next));
+
+ cfqq = RQ_CFQQ(next);
+ /*
+ * all requests of this queue are merged to other queues, delete it
+ * from the service tree. If it's the active_queue,
+ * cfq_dispatch_requests() will choose to expire it or do idle
+ */
+ if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY_ROOT(&cfqq->sort_list) &&
+ cfqq != cfqd->active_queue)
+ cfq_del_cfqq_rr(cfqd, cfqq);
}
static int cfq_allow_merge(struct request_queue *q, struct request *rq,