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.

blk-integrity: take const pointer in blk_integrity_rq()

blk_integrity_rq() doesn't modify the struct request passed in, so allow
a const pointer to be passed. Use a matching signature for the
!CONFIG_BLK_DEV_INTEGRITY version.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Caleb Sander Mateos and committed by
Jens Axboe
835042fb 5df832ba

+3 -3
+3 -3
include/linux/blk-integrity.h
··· 91 91 return bio_integrity_intervals(bi, sectors) * bi->metadata_size; 92 92 } 93 93 94 - static inline bool blk_integrity_rq(struct request *rq) 94 + static inline bool blk_integrity_rq(const struct request *rq) 95 95 { 96 96 return rq->cmd_flags & REQ_INTEGRITY; 97 97 } ··· 168 168 { 169 169 return 0; 170 170 } 171 - static inline int blk_integrity_rq(struct request *rq) 171 + static inline bool blk_integrity_rq(const struct request *rq) 172 172 { 173 - return 0; 173 + return false; 174 174 } 175 175 176 176 static inline struct bio_vec rq_integrity_vec(struct request *rq)