aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/dm-cache-policy-mq.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/md/dm-cache-policy-mq.c b/drivers/md/dm-cache-policy-mq.c
index ca05d69191e8..3c86b5efe78f 100644
--- a/drivers/md/dm-cache-policy-mq.c
+++ b/drivers/md/dm-cache-policy-mq.c
@@ -160,18 +160,6 @@ static void queue_remove(struct queue *q, struct list_head *elt)
160} 160}
161 161
162/* 162/*
163 * Shifts all regions down one level. This has no effect on the order of
164 * the queue.
165 */
166static void queue_shift_down(struct queue *q)
167{
168 unsigned level;
169
170 for (level = 1; level < NR_QUEUE_LEVELS; level++)
171 list_splice_init(q->qs + level, q->qs + level - 1);
172}
173
174/*
175 * Gives us the oldest entry of the lowest popoulated level. If the first 163 * Gives us the oldest entry of the lowest popoulated level. If the first
176 * level is emptied then we shift down one level. 164 * level is emptied then we shift down one level.
177 */ 165 */
@@ -193,10 +181,6 @@ static struct list_head *queue_pop(struct queue *q)
193 if (r) { 181 if (r) {
194 q->nr_elts--; 182 q->nr_elts--;
195 list_del(r); 183 list_del(r);
196
197 /* have we just emptied the bottom level? */
198 if (list_empty(q->qs))
199 queue_shift_down(q);
200 } 184 }
201 185
202 return r; 186 return r;