@@ -122,9 +122,6 @@ struct blkcg_gq {
122122 /* all non-root blkcg_gq's are guaranteed to have access to parent */
123123 struct blkcg_gq * parent ;
124124
125- /* request allocation list for this blkcg-q pair */
126- struct request_list rl ;
127-
128125 /* reference count */
129126 atomic_t refcnt ;
130127
@@ -515,94 +512,6 @@ static inline void blkg_put(struct blkcg_gq *blkg)
515512 if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \
516513 (p_blkg)->q, false)))
517514
518- /**
519- * blk_get_rl - get request_list to use
520- * @q: request_queue of interest
521- * @bio: bio which will be attached to the allocated request (may be %NULL)
522- *
523- * The caller wants to allocate a request from @q to use for @bio. Find
524- * the request_list to use and obtain a reference on it. Should be called
525- * under queue_lock. This function is guaranteed to return non-%NULL
526- * request_list.
527- */
528- static inline struct request_list * blk_get_rl (struct request_queue * q ,
529- struct bio * bio )
530- {
531- struct blkcg * blkcg ;
532- struct blkcg_gq * blkg ;
533-
534- rcu_read_lock ();
535-
536- blkcg = bio_blkcg (bio );
537-
538- /* bypass blkg lookup and use @q->root_rl directly for root */
539- if (blkcg == & blkcg_root )
540- goto root_rl ;
541-
542- /*
543- * Try to use blkg->rl. blkg lookup may fail under memory pressure
544- * or if either the blkcg or queue is going away. Fall back to
545- * root_rl in such cases.
546- */
547- blkg = blkg_lookup (blkcg , q );
548- if (unlikely (!blkg ))
549- goto root_rl ;
550-
551- blkg_get (blkg );
552- rcu_read_unlock ();
553- return & blkg -> rl ;
554- root_rl :
555- rcu_read_unlock ();
556- return & q -> root_rl ;
557- }
558-
559- /**
560- * blk_put_rl - put request_list
561- * @rl: request_list to put
562- *
563- * Put the reference acquired by blk_get_rl(). Should be called under
564- * queue_lock.
565- */
566- static inline void blk_put_rl (struct request_list * rl )
567- {
568- if (rl -> blkg -> blkcg != & blkcg_root )
569- blkg_put (rl -> blkg );
570- }
571-
572- /**
573- * blk_rq_set_rl - associate a request with a request_list
574- * @rq: request of interest
575- * @rl: target request_list
576- *
577- * Associate @rq with @rl so that accounting and freeing can know the
578- * request_list @rq came from.
579- */
580- static inline void blk_rq_set_rl (struct request * rq , struct request_list * rl )
581- {
582- rq -> rl = rl ;
583- }
584-
585- /**
586- * blk_rq_rl - return the request_list a request came from
587- * @rq: request of interest
588- *
589- * Return the request_list @rq is allocated from.
590- */
591- static inline struct request_list * blk_rq_rl (struct request * rq )
592- {
593- return rq -> rl ;
594- }
595-
596- struct request_list * __blk_queue_next_rl (struct request_list * rl ,
597- struct request_queue * q );
598- /**
599- * blk_queue_for_each_rl - iterate through all request_lists of a request_queue
600- *
601- * Should be used under queue_lock.
602- */
603- #define blk_queue_for_each_rl (rl , q ) \
604- for ((rl) = &(q)->root_rl; (rl); (rl) = __blk_queue_next_rl((rl), (q)))
605-
606515static inline int blkg_stat_init (struct blkg_stat * stat , gfp_t gfp )
607516{
608517 int ret ;
@@ -939,12 +848,6 @@ static inline char *blkg_path(struct blkcg_gq *blkg) { return NULL; }
939848static inline void blkg_get (struct blkcg_gq * blkg ) { }
940849static inline void blkg_put (struct blkcg_gq * blkg ) { }
941850
942- static inline struct request_list * blk_get_rl (struct request_queue * q ,
943- struct bio * bio ) { return & q -> root_rl ; }
944- static inline void blk_put_rl (struct request_list * rl ) { }
945- static inline void blk_rq_set_rl (struct request * rq , struct request_list * rl ) { }
946- static inline struct request_list * blk_rq_rl (struct request * rq ) { return & rq -> q -> root_rl ; }
947-
948851static inline bool blkcg_bio_issue_check (struct request_queue * q ,
949852 struct bio * bio ) { return true; }
950853
0 commit comments