LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: deallocate compressed pages when error happens
Date: Tue, 31 Aug 2021 09:57:03 +0800	[thread overview]
Message-ID: <d7268523-aa56-323a-d5a8-bef7fc69f126@kernel.org> (raw)
In-Reply-To: <20210831005346.118701-1-jaegeuk@kernel.org>

On 2021/8/31 8:53, Jaegeuk Kim wrote:
> In f2fs_write_multi_pages(), f2fs_compress_pages() allocates pages for
> compression work in cc->cpages[]. Then, f2fs_write_compressed_pages() initiates
> bio submission. But, if there's any error before submitting the IOs like early
> f2fs_cp_error(), previously it didn't free cpages by f2fs_compress_free_page().
> Let's fix memory leak by putting that just before deallocating cc->cpages.
> 

Fixes: 4c8ff7095bef ("f2fs: support data compression")

> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

      parent reply	other threads:[~2021-08-31  1:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  0:53 Jaegeuk Kim
2021-08-31  0:53 ` [PATCH 2/2] f2fs: should put a page beyond EOF when preparing a write Jaegeuk Kim
2021-08-31  2:04   ` [f2fs-dev] " Chao Yu
2021-08-31  1:57 ` Chao Yu [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=d7268523-aa56-323a-d5a8-bef7fc69f126@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [f2fs-dev] [PATCH 1/2] f2fs: deallocate compressed pages when error happens' \
    /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

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).