memcg_write_event_control(): switch to CLASS(fd)
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 23 Jul 2024 00:18:10 +0000 (20:18 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 3 Nov 2024 06:28:07 +0000 (01:28 -0500)
commit7133dd5ac603f04bbaca2bcf550cefdc3ccf6201
treefa5bbc977f4ccb21fd67338edfeb08f8ebc3731b
parent66635b0776243ff567db08601546b7f26b67dd08
memcg_write_event_control(): switch to CLASS(fd)

some reordering required - take both fdget() to the point before
the allocations, with matching move of fdput() to the very end
of failure exit(s); after that it converts trivially.

simplify the cleanups that involve css_put(), while we are at it...

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
mm/memcontrol-v1.c