Merge tag 'ceph-for-4.8-rc1' of git://github.com/ceph/ceph-client
[cascardo/linux.git] / drivers / block / rbd.c
index 58fd02d..1a04af6 100644 (file)
@@ -3286,9 +3286,9 @@ static void rbd_queue_workfn(struct work_struct *work)
                goto err;
        }
 
-       if (rq->cmd_flags & REQ_DISCARD)
+       if (req_op(rq) == REQ_OP_DISCARD)
                op_type = OBJ_OP_DISCARD;
-       else if (rq->cmd_flags & REQ_WRITE)
+       else if (req_op(rq) == REQ_OP_WRITE)
                op_type = OBJ_OP_WRITE;
        else
                op_type = OBJ_OP_READ;