nfp: correct desc type when header dma len is 4096
[platform/kernel/linux-starfive.git] / block / blk-wbt.c
index 2464679..c293e08 100644 (file)
@@ -841,12 +841,11 @@ int wbt_init(struct request_queue *q)
        rwb->last_comp = rwb->last_issue = jiffies;
        rwb->win_nsec = RWB_WINDOW_NSEC;
        rwb->enable_state = WBT_STATE_ON_DEFAULT;
-       rwb->wc = 1;
+       rwb->wc = test_bit(QUEUE_FLAG_WC, &q->queue_flags);
        rwb->rq_depth.default_depth = RWB_DEF_DEPTH;
        rwb->min_lat_nsec = wbt_default_latency_nsec(q);
 
        wbt_queue_depth_changed(&rwb->rqos);
-       wbt_set_write_cache(q, test_bit(QUEUE_FLAG_WC, &q->queue_flags));
 
        /*
         * Assign rwb and add the stats callback.