diff options
author | Mike Christie | 2016-06-05 21:32:16 +0200 |
---|---|---|
committer | Jens Axboe | 2016-06-07 21:41:38 +0200 |
commit | d9d8c5c489f4969667a05727e9c2c4f78cffef1a (patch) | |
tree | a8702df6c2472686642702a8b9ce3db93b9ba034 /include/linux/blkdev.h | |
parent | block: convert merge/insert code to check for REQ_OPs. (diff) | |
download | kernel-qcow2-linux-d9d8c5c489f4969667a05727e9c2c4f78cffef1a.tar.gz kernel-qcow2-linux-d9d8c5c489f4969667a05727e9c2c4f78cffef1a.tar.xz kernel-qcow2-linux-d9d8c5c489f4969667a05727e9c2c4f78cffef1a.zip |
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/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 6 |
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) |