block: switch on bio operation in bio_integrity_prep
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Jun 2024 04:59:37 +0000 (06:59 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 28 Jun 2024 16:29:41 +0000 (10:29 -0600)
commitdf3c485e0e60e8ad87f168092f1513a3d621fa4b
tree0928db7ee71a68fd0c6f9796dd9268cb757efb26
parentdac18fabba59149acec42621b9b603654e9459b2
block: switch on bio operation in bio_integrity_prep

Use a single switch to perform read and write specific checks and exit
early for other operations instead of having two checks using different
predicates.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240626045950.189758-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio-integrity.c