]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/block/nbd.c
Merge branch 'for-4.8/core' of git://git.kernel.dk/linux-block
[mirror_ubuntu-artful-kernel.git] / drivers / block / nbd.c
index 6a48ed41963ff9d215665b1423d20567fc50ee06..6f55b262b5ced7c371115091e248421248b35c18 100644 (file)
@@ -282,9 +282,9 @@ static int nbd_send_req(struct nbd_device *nbd, struct request *req)
 
        if (req->cmd_type == REQ_TYPE_DRV_PRIV)
                type = NBD_CMD_DISC;
-       else if (req->cmd_flags & REQ_DISCARD)
+       else if (req_op(req) == REQ_OP_DISCARD)
                type = NBD_CMD_TRIM;
-       else if (req->cmd_flags & REQ_FLUSH)
+       else if (req_op(req) == REQ_OP_FLUSH)
                type = NBD_CMD_FLUSH;
        else if (rq_data_dir(req) == WRITE)
                type = NBD_CMD_WRITE;