Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: move around bio flagging helpers

We'll need bio_flagged() earlier in bio.h for later patches, move it
together with all related helpers, and mark the bio_flagged()'s bio
argument as const.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
d9f514d3 a0750fae

+15 -15
+15 -15
include/linux/bio.h
··· 46 46 #define bio_data_dir(bio) \ 47 47 (op_is_write(bio_op(bio)) ? WRITE : READ) 48 48 49 + static inline bool bio_flagged(const struct bio *bio, unsigned int bit) 50 + { 51 + return bio->bi_flags & (1U << bit); 52 + } 53 + 54 + static inline void bio_set_flag(struct bio *bio, unsigned int bit) 55 + { 56 + bio->bi_flags |= (1U << bit); 57 + } 58 + 59 + static inline void bio_clear_flag(struct bio *bio, unsigned int bit) 60 + { 61 + bio->bi_flags &= ~(1U << bit); 62 + } 63 + 49 64 /* 50 65 * Check whether this bio carries any data or not. A NULL bio is allowed. 51 66 */ ··· 238 223 smp_mb(); 239 224 } 240 225 atomic_set(&bio->__bi_cnt, count); 241 - } 242 - 243 - static inline bool bio_flagged(struct bio *bio, unsigned int bit) 244 - { 245 - return bio->bi_flags & (1U << bit); 246 - } 247 - 248 - static inline void bio_set_flag(struct bio *bio, unsigned int bit) 249 - { 250 - bio->bi_flags |= (1U << bit); 251 - } 252 - 253 - static inline void bio_clear_flag(struct bio *bio, unsigned int bit) 254 - { 255 - bio->bi_flags &= ~(1U << bit); 256 226 } 257 227 258 228 static inline struct bio_vec *bio_first_bvec_all(struct bio *bio)