int el_ret;
        unsigned int bytes = bio->bi_size;
        const unsigned short prio = bio_prio(bio);
-       const bool sync = (bio->bi_rw & REQ_SYNC);
-       const bool unplug = (bio->bi_rw & REQ_UNPLUG);
-       const unsigned int ff = bio->bi_rw & REQ_FAILFAST_MASK;
+       const bool sync = !!(bio->bi_rw & REQ_SYNC);
+       const bool unplug = !!(bio->bi_rw & REQ_UNPLUG);
+       const unsigned long ff = bio->bi_rw & REQ_FAILFAST_MASK;
 +      int where = ELEVATOR_INSERT_SORT;
        int rw_flags;
  
 -      if ((bio->bi_rw & REQ_HARDBARRIER) &&
 -          (q->next_ordered == QUEUE_ORDERED_NONE)) {
 +      /* REQ_HARDBARRIER is no more */
 +      if (WARN_ONCE(bio->bi_rw & REQ_HARDBARRIER,
 +              "block: HARDBARRIER is deprecated, use FLUSH/FUA instead\n")) {
                bio_endio(bio, -EOPNOTSUPP);
                return 0;
        }