diff options
author | Eric Biggers <[email protected]> | 2023-02-02 16:55:03 -0800 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2023-03-07 20:12:30 -0500 |
commit | ffec85d53d0f39ee4680a2cf0795255e000e1feb (patch) | |
tree | e4a79d37b1e49b1f016f71de05553a08213bd5c5 /lib/test_fortify/write_overflow-strscpy.c | |
parent | e3645d72f8865ffe36f9dc811540d40aa3c848d3 (diff) |
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: [email protected]
Reported-by: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strscpy.c')
0 files changed, 0 insertions, 0 deletions