blkcg: update blkg_lookup_create() to do locking
[sfrench/cifs-2.6.git] / include / linux / blk-cgroup.h
index f619307171a61381a678ff2884251bceb71f72a4..b3b1a8187d23271da15e3ac8ae22419a3e54e471 100644 (file)
@@ -181,6 +181,8 @@ extern struct cgroup_subsys_state * const blkcg_root_css;
 
 struct blkcg_gq *blkg_lookup_slowpath(struct blkcg *blkcg,
                                      struct request_queue *q, bool update_hint);
+struct blkcg_gq *__blkg_lookup_create(struct blkcg *blkcg,
+                                     struct request_queue *q);
 struct blkcg_gq *blkg_lookup_create(struct blkcg *blkcg,
                                    struct request_queue *q);
 int blkcg_init_queue(struct request_queue *q);
@@ -799,7 +801,7 @@ static inline bool blkcg_bio_issue_check(struct request_queue *q,
        blkg = blkg_lookup(blkcg, q);
        if (unlikely(!blkg)) {
                spin_lock_irq(&q->queue_lock);
-               blkg = blkg_lookup_create(blkcg, q);
+               blkg = __blkg_lookup_create(blkcg, q);
                if (IS_ERR(blkg))
                        blkg = NULL;
                spin_unlock_irq(&q->queue_lock);