summaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-03-07 17:10:02 -0800
committerJens Axboe <axboe@kernel.dk>2018-03-08 14:13:48 -0700
commit66f91322f39cd18a01524264464c2ff4c98c936e (patch)
treec3d957af32b2bd00d179306d3a2db44a29b29a08 /include/linux/blkdev.h
parentd15e1175a9a9af967ae01245f55196acb5d5ff0f (diff)
downloadlinux-stable-66f91322f39cd18a01524264464c2ff4c98c936e.tar.gz
linux-stable-66f91322f39cd18a01524264464c2ff4c98c936e.tar.bz2
linux-stable-66f91322f39cd18a01524264464c2ff4c98c936e.zip
block: Reorder the queue flag manipulation function definitions
Move the definition of queue_flag_clear_unlocked() up and move the definition of queue_in_flight() down such that all queue flag manipulation function definitions become contiguous. This patch does not change any functionality. Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Ming Lei <ming.lei@redhat.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 667a9b0053d9..c351aaec3ca7 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -726,6 +726,12 @@ static inline void queue_flag_set_unlocked(unsigned int flag,
__set_bit(flag, &q->queue_flags);
}
+static inline void queue_flag_clear_unlocked(unsigned int flag,
+ struct request_queue *q)
+{
+ __clear_bit(flag, &q->queue_flags);
+}
+
static inline int queue_flag_test_and_clear(unsigned int flag,
struct request_queue *q)
{
@@ -758,17 +764,6 @@ static inline void queue_flag_set(unsigned int flag, struct request_queue *q)
__set_bit(flag, &q->queue_flags);
}
-static inline void queue_flag_clear_unlocked(unsigned int flag,
- struct request_queue *q)
-{
- __clear_bit(flag, &q->queue_flags);
-}
-
-static inline int queue_in_flight(struct request_queue *q)
-{
- return q->in_flight[0] + q->in_flight[1];
-}
-
static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
{
queue_lockdep_assert_held(q);
@@ -804,6 +799,11 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
extern int blk_set_preempt_only(struct request_queue *q);
extern void blk_clear_preempt_only(struct request_queue *q);
+static inline int queue_in_flight(struct request_queue *q)
+{
+ return q->in_flight[0] + q->in_flight[1];
+}
+
static inline bool blk_account_rq(struct request *rq)
{
return (rq->rq_flags & RQF_STARTED) && !blk_rq_is_passthrough(rq);