From: Eric Wheeler <bcache@lists.ewheeler.net>
To: Liang Chen <liangchen.linux@gmail.com>
Cc: colyli@suse.de, kent.overstreet@gmail.com,
linux-kernel@vger.kernel.org, linux-bcache@vger.kernel.org
Subject: Re: [PATCH 1/2] [PATCH] bcache: cached_dev_free needs to put the sb page
Date: Fri, 6 Dec 2019 23:08:55 +0000 (UTC) [thread overview]
Message-ID: <alpine.LRH.2.11.1912062308370.11561@mx.ewheeler.net> (raw)
In-Reply-To: <1575622543-22470-1-git-send-email-liangchen.linux@gmail.com>
On Fri, 6 Dec 2019, Liang Chen wrote:
> Same as cache device, the buffer page needs to be put while
> freeing cached_dev. Otherwise a page would be leaked every
> time a cached_dev is stopped.
>
> Signed-off-by: Liang Chen <liangchen.linux@gmail.com>
+cc stable?
--
Eric Wheeler
> ---
> drivers/md/bcache/super.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index 77e9869345e7..a573ce1d85aa 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -1275,6 +1275,9 @@ static void cached_dev_free(struct closure *cl)
>
> mutex_unlock(&bch_register_lock);
>
> + if (dc->sb_bio.bi_inline_vecs[0].bv_page)
> + put_page(bio_first_page_all(&dc->sb_bio));
> +
> if (!IS_ERR_OR_NULL(dc->bdev))
> blkdev_put(dc->bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL);
>
> --
> 2.17.0
>
>
prev parent reply other threads:[~2019-12-06 23:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 8:55 Liang Chen
2019-12-06 8:55 ` [PATCH 2/2] [PATCH] bcache: __write_super to handle page sizes other than 4k Liang Chen
2019-12-06 9:23 ` Christoph Hellwig
2019-12-06 11:23 ` Liang C
2019-12-06 9:44 ` Coly Li
2019-12-06 11:22 ` Liang C
2019-12-09 7:37 ` Christoph Hellwig
2019-12-09 9:52 ` Coly Li
2019-12-09 10:21 ` Liang C
2019-12-06 9:27 ` [PATCH 1/2] [PATCH] bcache: cached_dev_free needs to put the sb page Christoph Hellwig
2019-12-06 11:27 ` Liang C
2019-12-06 9:42 ` Coly Li
2019-12-06 23:08 ` Eric Wheeler [this message]
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=alpine.LRH.2.11.1912062308370.11561@mx.ewheeler.net \
--to=bcache@lists.ewheeler.net \
--cc=colyli@suse.de \
--cc=kent.overstreet@gmail.com \
--cc=liangchen.linux@gmail.com \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®