bfq: fix blkio cgroup leakage v4
[linux-2.6-microblaze.git] / block / bfq-wf2q.c
index eb0e2a6..26776bd 100644 (file)
@@ -533,9 +533,7 @@ static void bfq_get_entity(struct bfq_entity *entity)
                bfqq->ref++;
                bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d",
                             bfqq, bfqq->ref);
-       } else
-               bfqg_and_blkg_get(container_of(entity, struct bfq_group,
-                                              entity));
+       }
 }
 
 /**
@@ -649,14 +647,8 @@ static void bfq_forget_entity(struct bfq_service_tree *st,
 
        entity->on_st_or_in_serv = false;
        st->wsum -= entity->weight;
-       if (is_in_service)
-               return;
-
-       if (bfqq)
+       if (bfqq && !is_in_service)
                bfq_put_queue(bfqq);
-       else
-               bfqg_and_blkg_put(container_of(entity, struct bfq_group,
-                                              entity));
 }
 
 /**