diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-08-04 05:39:23 -0700 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-08-04 07:22:27 -0600 |
| commit | 6c13180dba60f835d6909e2a3b4f50862de156c6 (patch) | |
| tree | 3f356f4d623558ae275cd4011c8a7d211c6eab20 /block | |
| parent | d73b5b0690e36b2a9e6022f6712e9fa7fd338632 (diff) | |
| download | linux-6c13180dba60f835d6909e2a3b4f50862de156c6.tar.gz linux-6c13180dba60f835d6909e2a3b4f50862de156c6.zip | |
block: remove bip_should_check
There is no benefit in using this helper over the simple flags check.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Link: https://patch.msgid.link/20260804123928.736596-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
| -rw-r--r-- | block/bio-integrity-auto.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/block/bio-integrity-auto.c b/block/bio-integrity-auto.c index b1c733ecfd2e..43ac9f338183 100644 --- a/block/bio-integrity-auto.c +++ b/block/bio-integrity-auto.c @@ -45,10 +45,6 @@ static void bio_integrity_verify_fn(struct work_struct *work) } #define BIP_CHECK_FLAGS (BIP_CHECK_GUARD | BIP_CHECK_REFTAG | BIP_CHECK_APPTAG) -static bool bip_should_check(struct bio_integrity_payload *bip) -{ - return bip->bip_flags & BIP_CHECK_FLAGS; -} /** * __bio_integrity_endio - Integrity I/O completion function @@ -66,7 +62,7 @@ bool __bio_integrity_endio(struct bio *bio) container_of(bip, struct bio_integrity_data, bip); if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && - bip_should_check(bip)) { + (bip->bip_flags & BIP_CHECK_FLAGS)) { INIT_WORK(&bid->work, bio_integrity_verify_fn); queue_work(kintegrityd_wq, &bid->work); return false; @@ -99,7 +95,7 @@ void bio_integrity_prep(struct bio *bio, unsigned int action) bio_integrity_setup_default(bio); /* Auto-generate integrity metadata if this is a write */ - if (bio_data_dir(bio) == WRITE && bip_should_check(&bid->bip)) + if (bio_data_dir(bio) == WRITE && (bid->bip.bip_flags & BIP_CHECK_FLAGS)) bio_integrity_generate(bio); else bid->saved_bio_iter = bio->bi_iter; |
