diff options
author | Mike Christie <mchristi@redhat.com> | 2016-06-05 14:32:17 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-06-07 13:41:38 -0600 |
commit | c2df40dfb8c015211ec55f4b1dd0587f875c7b34 (patch) | |
tree | 8660ea8a2a00b0248fa609e7e6b737a8d92306d9 /drivers/block/nbd.c | |
parent | d9d8c5c489f4969667a05727e9c2c4f78cffef1a (diff) |
drivers: use req op accessor
The req operation REQ_OP is separated from the rq_flag_bits
definition. This converts the block layer drivers to
use req_op to get the op from the request struct.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 31e73a7a40f2..6c2c28d124d0 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -282,7 +282,7 @@ 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) type = NBD_CMD_FLUSH; |