From: Greg KH <greg@kroah.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: stable@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net,
linux-fscrypt@vger.kernel.org,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Tejun Heo <tj@kernel.org>, Chao Yu <chao@kernel.org>,
Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [PATCH 4.19] f2fs: fix cgroup writeback accounting with fs-layer encryption
Date: Fri, 10 Mar 2023 13:57:34 +0100 [thread overview]
Message-ID: <ZAspPgX+RazeDcgx@kroah.com> (raw)
In-Reply-To: <20230308061746.711142-1-ebiggers@kernel.org>
On Tue, Mar 07, 2023 at 10:17:46PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> commit 844545c51a5b2a524b22a2fe9d0b353b827d24b4 upstream.
>
> When writing a page from an encrypted file that is using
> filesystem-layer encryption (not inline encryption), f2fs encrypts the
> pagecache page into a bounce page, then writes the bounce page.
>
> It also passes the bounce page to wbc_account_cgroup_owner(). That's
> incorrect, because the bounce page is a newly allocated temporary page
> that doesn't have the memory cgroup of the original pagecache page.
> This makes wbc_account_cgroup_owner() not account the I/O to the owner
> of the pagecache page as it should.
>
> Fix this by always passing the pagecache page to
> wbc_account_cgroup_owner().
>
> Fixes: 578c647879f7 ("f2fs: implement cgroup writeback support")
> Cc: stable@vger.kernel.org
> Reported-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> Acked-by: Tejun Heo <tj@kernel.org>
> Reviewed-by: Chao Yu <chao@kernel.org>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/data.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2023-03-10 12:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 6:17 [PATCH 4.19] f2fs: fix cgroup writeback accounting with fs-layer encryption Eric Biggers
2023-03-10 12:57 ` Greg KH [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=ZAspPgX+RazeDcgx@kroah.com \
--to=greg@kroah.com \
--cc=chao@kernel.org \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fscrypt@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
--cc=willy@infradead.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).