[PATCH] block: unmap and free user mapped integrity via submitter
Anuj gupta
anuj1072538 at gmail.com
Fri May 10 11:42:31 PDT 2024
On Fri, May 10, 2024 at 7:15 PM Jens Axboe <axboe at kernel.dk> wrote:
>
> 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;
>
> ?
Right, I will fix this in the next version.
>
> --
> Jens Axboe
>
--
Anuj Gupta
More information about the Linux-nvme
mailing list