projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers: use req op accessor
[cascardo/linux.git]
/
drivers
/
block
/
xen-blkfront.c
diff --git
a/drivers/block/xen-blkfront.c
b/drivers/block/xen-blkfront.c
index
52963a2
..
6fd1601
100644
(file)
--- a/
drivers/block/xen-blkfront.c
+++ b/
drivers/block/xen-blkfront.c
@@
-844,7
+844,8
@@
static int blkif_queue_request(struct request *req, struct blkfront_ring_info *r
if (unlikely(rinfo->dev_info->connected != BLKIF_STATE_CONNECTED))
return 1;
if (unlikely(rinfo->dev_info->connected != BLKIF_STATE_CONNECTED))
return 1;
- if (unlikely(req->cmd_flags & (REQ_DISCARD | REQ_SECURE)))
+ if (unlikely(req_op(req) == REQ_OP_DISCARD ||
+ req->cmd_flags & REQ_SECURE))
return blkif_queue_discard_req(req, rinfo);
else
return blkif_queue_rw_req(req, rinfo);
return blkif_queue_discard_req(req, rinfo);
else
return blkif_queue_rw_req(req, rinfo);
@@
-2054,8
+2055,9
@@
static int blkif_recover(struct blkfront_info *info)
/*
* Get the bios in the request so we can re-queue them.
*/
/*
* Get the bios in the request so we can re-queue them.
*/
- if (copy[i].request->cmd_flags &
- (REQ_FLUSH | REQ_FUA | REQ_DISCARD | REQ_SECURE)) {
+ if (copy[i].request->cmd_flags & REQ_FLUSH ||
+ req_op(copy[i].request) == REQ_OP_DISCARD ||
+ copy[i].request->cmd_flags & (REQ_FUA | REQ_SECURE)) {
/*
* Flush operations don't contain bios, so
* we need to requeue the whole request
/*
* Flush operations don't contain bios, so
* we need to requeue the whole request