On 5/10/24 3:44 AM, Anuj Gupta wrote: > +/** > + * bio_integrity_unmap_free_user - Unmap and free bio user integrity payload > + * @bio: bio containing bip to be unmapped and freed > + * > + * Description: Used to unmap and free the user mapped integrity portion of a > + * bio. Submitter attaching the user integrity buffer is responsible for > + * unmapping and freeing it during completion. > + */ > +void bio_integrity_unmap_free_user(struct bio *bio) > +{ > + struct bio_integrity_payload *bip = bio_integrity(bio); > + struct bio_set *bs = bio->bi_pool; > + > + WARN_ON(!(bip->bip_flags & BIP_INTEGRITY_USER)); > + bio_integrity_unmap_user(bip); > + __bio_integrity_free(bs, bip); > + bio->bi_integrity = NULL; > + bio->bi_opf &= ~REQ_INTEGRITY; > +} > +EXPORT_SYMBOL(bio_integrity_unmap_free_user); Should this be a if (WARN_ON_ONCE(!(bip->bip_flags & BIP_INTEGRITY_USER))) return; ? -- Jens Axboe