]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/nvme/host/pci.c
block: introduce blk_rq_is_passthrough
[mirror_ubuntu-artful-kernel.git] / drivers / nvme / host / pci.c
index 7103bce4ba4f2aa4e90649693c513a4a5fd86882..f29365b8c9be0766537e72bdff0dd89833e1a7a3 100644 (file)
@@ -588,7 +588,7 @@ static int nvme_queue_rq(struct blk_mq_hw_ctx *hctx,
         */
        if (ns && ns->ms && !blk_integrity_rq(req)) {
                if (!(ns->pi_type && ns->ms == 8) &&
-                                       req->cmd_type != REQ_TYPE_DRV_PRIV) {
+                   !blk_rq_is_passthrough(req)) {
                        blk_mq_end_request(req, -EFAULT);
                        return BLK_MQ_RQ_QUEUE_OK;
                }
@@ -645,7 +645,7 @@ static void nvme_complete_rq(struct request *req)
                        return;
                }
 
-               if (req->cmd_type == REQ_TYPE_DRV_PRIV)
+               if (blk_rq_is_passthrough(req))
                        error = req->errors;
                else
                        error = nvme_error_status(req->errors);