return 0;
 }
 
-/*
- * Determine if elevator data should be initialized when allocating the
- * request associated with @bio.
- */
-static bool blk_rq_should_init_elevator(struct bio *bio)
-{
-       if (!bio)
-               return true;
-
-       /*
-        * Flush requests do not use the elevator so skip initialization.
-        * This allows a request to share the flush and elevator data.
-        */
-       if (op_is_flush(bio->bi_opf))
-               return false;
-
-       return true;
-}
-
 /**
  * __get_request - get a free request
  * @rl: request list to allocate from
         * request is freed.  This guarantees icq's won't be destroyed and
         * makes creating new ones safe.
         *
+        * Flush requests do not use the elevator so skip initialization.
+        * This allows a request to share the flush and elevator data.
+        *
         * Also, lookup icq while holding queue_lock.  If it doesn't exist,
         * it will be created after releasing queue_lock.
         */
-       if (blk_rq_should_init_elevator(bio) && !blk_queue_bypass(q)) {
+       if (!op_is_flush(op) && !blk_queue_bypass(q)) {
                rq_flags |= RQF_ELVPRIV;
                q->nr_rqs_elvpriv++;
                if (et->icq_cache && ioc)
 {
        struct request *rq;
 
-       BUG_ON(rw != READ && rw != WRITE);
-
        /* create ioc upfront */
        create_io_context(gfp_mask, q->node);