@@ -350,7 +350,7 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, struct gendisk *disk,
350
350
351
351
/* link parent */
352
352
if (blkcg_parent (blkcg )) {
353
- blkg -> parent = blkg_lookup (blkcg_parent (blkcg ), disk );
353
+ blkg -> parent = blkg_lookup (blkcg_parent (blkcg ), disk -> queue );
354
354
if (WARN_ON_ONCE (!blkg -> parent )) {
355
355
ret = - ENODEV ;
356
356
goto err_put_css ;
@@ -423,12 +423,12 @@ static struct blkcg_gq *blkg_lookup_create(struct blkcg *blkcg,
423
423
424
424
WARN_ON_ONCE (!rcu_read_lock_held ());
425
425
426
- blkg = blkg_lookup (blkcg , disk );
426
+ blkg = blkg_lookup (blkcg , q );
427
427
if (blkg )
428
428
return blkg ;
429
429
430
430
spin_lock_irqsave (& q -> queue_lock , flags );
431
- blkg = blkg_lookup (blkcg , disk );
431
+ blkg = blkg_lookup (blkcg , q );
432
432
if (blkg ) {
433
433
if (blkcg != & blkcg_root &&
434
434
blkg != rcu_dereference (blkcg -> blkg_hint ))
@@ -447,7 +447,7 @@ static struct blkcg_gq *blkg_lookup_create(struct blkcg *blkcg,
447
447
struct blkcg_gq * ret_blkg = q -> root_blkg ;
448
448
449
449
while (parent ) {
450
- blkg = blkg_lookup (parent , disk );
450
+ blkg = blkg_lookup (parent , q );
451
451
if (blkg ) {
452
452
/* remember closest blkg */
453
453
ret_blkg = blkg ;
@@ -733,7 +733,7 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
733
733
goto fail_unlock ;
734
734
}
735
735
736
- blkg = blkg_lookup (blkcg , disk );
736
+ blkg = blkg_lookup (blkcg , q );
737
737
if (blkg )
738
738
goto success ;
739
739
@@ -747,7 +747,7 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
747
747
struct blkcg_gq * new_blkg ;
748
748
749
749
parent = blkcg_parent (blkcg );
750
- while (parent && !blkg_lookup (parent , disk )) {
750
+ while (parent && !blkg_lookup (parent , q )) {
751
751
pos = parent ;
752
752
parent = blkcg_parent (parent );
753
753
}
@@ -777,7 +777,7 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
777
777
goto fail_preloaded ;
778
778
}
779
779
780
- blkg = blkg_lookup (pos , disk );
780
+ blkg = blkg_lookup (pos , q );
781
781
if (blkg ) {
782
782
blkg_free (new_blkg );
783
783
} else {
@@ -1852,7 +1852,7 @@ void blkcg_maybe_throttle_current(void)
1852
1852
blkcg = css_to_blkcg (blkcg_css ());
1853
1853
if (!blkcg )
1854
1854
goto out ;
1855
- blkg = blkg_lookup (blkcg , disk );
1855
+ blkg = blkg_lookup (blkcg , disk -> queue );
1856
1856
if (!blkg )
1857
1857
goto out ;
1858
1858
if (!blkg_tryget (blkg ))
0 commit comments