Re: [PATCH] block: unmap and free user mapped integrity via submitter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 10, 2024 at 7:15 PM Jens Axboe <axboe@xxxxxxxxx> 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





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux