summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2016-06-05 14:32:16 -0500
committerJens Axboe <axboe@fb.com>2016-06-07 13:41:38 -0600
commitd9d8c5c489f4969667a05727e9c2c4f78cffef1a (patch)
treea8702df6c2472686642702a8b9ce3db93b9ba034 /include
parent8fe0d473f5477e9916d3ac581a226acfe83142be (diff)
block: convert is_sync helpers to use REQ_OPs.
This patch converts the is_sync helpers to use separate variables for the operation and flags. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 25f01ff19780..4937c056fcbd 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -624,14 +624,14 @@ static inline unsigned int blk_queue_cluster(struct request_queue *q)
/*
* We regard a request as sync, if either a read or a sync write
*/
-static inline bool rw_is_sync(unsigned int rw_flags)
+static inline bool rw_is_sync(int op, unsigned int rw_flags)
{
- return !(rw_flags & REQ_WRITE) || (rw_flags & REQ_SYNC);
+ return op == REQ_OP_READ || (rw_flags & REQ_SYNC);
}
static inline bool rq_is_sync(struct request *rq)
{
- return rw_is_sync(rq->cmd_flags);
+ return rw_is_sync(req_op(rq), rq->cmd_flags);
}
static inline bool blk_rl_full(struct request_list *rl, bool sync)