android_kernel_motorola_sm6375/fs/f2fs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eric Biggers 68a47ca958 f2fs: fix cgroup writeback accounting with fs-layer encryption
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: 578c647879 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-11 16:44:00 +01:00
..
acl.c
acl.h
checkpoint.c f2fs: fix to do sanity check on destination blkaddr during recovery 2022-10-26 13:22:17 +02:00
data.c f2fs: fix cgroup writeback accounting with fs-layer encryption 2023-03-11 16:44:00 +01:00
debug.c
dir.c
extent_cache.c f2fs: let's avoid panic if extent_tree is not created 2023-01-24 07:17:58 +01:00
f2fs.h f2fs: fix to do sanity check on destination blkaddr during recovery 2022-10-26 13:22:17 +02:00
file.c
gc.c f2fs: fix to do sanity check on i_extra_isize in is_alive() 2023-02-22 12:50:29 +01:00
gc.h
hash.c
inline.c f2fs: fix information leak in f2fs_move_inline_dirents() 2023-03-11 16:43:59 +01:00
inode.c
Kconfig
Makefile
namei.c
node.c
node.h
recovery.c f2fs: fix to do sanity check on summary info 2022-10-26 13:22:17 +02:00
segment.c f2fs: fix normal discard process 2023-01-18 11:41:17 +01:00
segment.h
shrinker.c
super.c
sysfs.c
trace.c
trace.h
verity.c
xattr.c
xattr.h