block: kill off q->flush_flags
[cascardo/linux.git] / drivers / target / target_core_iblock.c
index 026a758..7c4efb4 100644 (file)
@@ -687,10 +687,10 @@ iblock_execute_rw(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
                 * Force writethrough using WRITE_FUA if a volatile write cache
                 * is not enabled, or if initiator set the Force Unit Access bit.
                 */
-               if (q->flush_flags & REQ_FUA) {
+               if (test_bit(QUEUE_FLAG_FUA, &q->queue_flags)) {
                        if (cmd->se_cmd_flags & SCF_FUA)
                                rw = WRITE_FUA;
-                       else if (!(q->flush_flags & REQ_FLUSH))
+                       else if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags))
                                rw = WRITE_FUA;
                        else
                                rw = WRITE;
@@ -836,7 +836,7 @@ static bool iblock_get_write_cache(struct se_device *dev)
        struct block_device *bd = ib_dev->ibd_bd;
        struct request_queue *q = bdev_get_queue(bd);
 
-       return q->flush_flags & REQ_FLUSH;
+       return test_bit(QUEUE_FLAG_WC, &q->queue_flags);
 }
 
 static const struct target_backend_ops iblock_ops = {