From: Christoph Hellwig <hch@lst.de>
To: Shaohua Li <shli@fb.com>
Cc: linux-block@vger.kernel.org, hch@lst.de, axboe@fb.com,
Kernel-team@fb.com
Subject: Re: [PATCH] block: call __bio_free in bio_endio
Date: Thu, 29 Jun 2017 22:24:03 +0200 [thread overview]
Message-ID: <20170629202403.GB416@lst.de> (raw)
In-Reply-To: <a4ff33f2c114d0d0e1d1f41b7524078d2e9fd3f0.1498762065.git.shli@fb.com>
On Thu, Jun 29, 2017 at 11:54:17AM -0700, Shaohua Li wrote:
> bio_free isn't a good place to free cgroup info. There are a
> lot of cases bio is allocated in special way (for example, in stack) and
> never gets called by bio_put hence bio_free, we are leaking memory. This
> patch moves the free to bio endio, which should be called anyway. The
> __bio_free call in bio_free is kept, in case the bio never gets called
> bio endio.
Jens already renamed __bio_free to bio_uninit in Linus' tree.
That being said I think we should just kill __bio_free once all
the work is in. But I think we should defer this post the
initial pull for 4.12-rc to reduce the merge pain.
next prev parent reply other threads:[~2017-06-29 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-29 18:54 [PATCH] block: call __bio_free in bio_endio Shaohua Li
2017-06-29 20:24 ` Christoph Hellwig [this message]
2017-06-29 21:23 ` Jens Axboe
[not found] ` <20170710182551.dqxqcksyoizw573i@kernel.org>
2017-07-10 18:26 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170629202403.GB416@lst.de \
--to=hch@lst.de \
--cc=Kernel-team@fb.com \
--cc=axboe@fb.com \
--cc=linux-block@vger.kernel.org \
--cc=shli@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).