- Subject: Re: [PATCH v2 07/14] pktcdvd: Switch to bio_kmalloc()
- From: Kent Overstreet <koverstreet@xxxxxxxxxx>
- Date: Thu, 24 May 2012 12:55:49 -0700
- Cc: axboe@xxxxxxxxx, yehuda@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, tj@xxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, mpatocka@xxxxxxxxxx, bharrosh@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, sage@xxxxxxxxxxxx, agk@xxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx
- In-reply-to: <20120524194252.GF27550@redhat.com>
- References: <1337817771-25038-1-git-send-email-koverstreet@google.com> <1337817771-25038-8-git-send-email-koverstreet@google.com> <20120524194252.GF27550@redhat.com>
- Reply-to: device-mapper development <dm-devel@xxxxxxxxxx>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, May 24, 2012 at 03:42:52PM -0400, Vivek Goyal wrote:
> On Wed, May 23, 2012 at 05:02:44PM -0700, Kent Overstreet wrote:
>
> [..]
> > @@ -567,10 +569,13 @@ static struct packet_data *pkt_alloc_packet_data(int frames)
> > goto no_pkt;
> >
> > pkt->frames = frames;
> > - pkt->w_bio = pkt_bio_alloc(frames);
> > + pkt->w_bio = bio_kmalloc(GFP_KERNEL, frames);
>
> So previously bios allocated were being kfreed by pkt_bio_destructor().
> Now where are we doing kfree() on bio being allocated by bio_kmalloc()?
bio_kmalloc() sets up bi_destructor, so there's no need to kfree() the
bio - bio_put() frees it just like normal.
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel
[DM Crypt]
[Fedora Desktop]
[ATA RAID]
[Fedora Marketing]
[Fedora Packaging]
[Fedora SELinux]
[Yosemite Discussion]
[Yosemite Photos]
[KDE Users]
[Fedora Tools]
[Fedora Docs]