summaryrefslogtreecommitdiffstats
path: root/fs/afs/dynroot.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2023-02-03 01:55:03 +0100
committerTheodore Ts'o <tytso@mit.edu>2023-03-08 02:12:30 +0100
commitffec85d53d0f39ee4680a2cf0795255e000e1feb (patch)
treee4a79d37b1e49b1f016f71de05553a08213bd5c5 /fs/afs/dynroot.c
parentext4: fix incorrect options show of original mount_opt and extend mount_opt2 (diff)
downloadlinux-ffec85d53d0f39ee4680a2cf0795255e000e1feb.tar.xz
linux-ffec85d53d0f39ee4680a2cf0795255e000e1feb.zip
ext4: fix cgroup writeback accounting with fs-layer encryption
When writing a page from an encrypted file that is using filesystem-layer encryption (not inline encryption), ext4 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: 001e4a8775f6 ("ext4: 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> Link: https://lore.kernel.org/r/20230203005503.141557-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/afs/dynroot.c')
0 files changed, 0 insertions, 0 deletions