coredump: prepare to simplify exit paths
authorChristian Brauner <brauner@kernel.org>
Thu, 12 Jun 2025 13:25:25 +0000 (15:25 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 16 Jun 2025 15:01:23 +0000 (17:01 +0200)
commita961c737cda8f172e108da881691cadafb9a061e
treeb41dd05beb39d5fe0b489f0b0f88000eb37c41a3
parent7bbb05dbea38e56d9f6ac7ac1040f93b0808cbce
coredump: prepare to simplify exit paths

The exit path is currently entangled with core pipe limit accounting
which is really unpleasant. Use a local variable in struct core_name
that remembers whether the count was incremented and if so to clean
decrement in once the coredump is done. Assert that this only happens
for pipes.

Link: https://lore.kernel.org/20250612-work-coredump-massage-v1-11-315c0c34ba94@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/coredump.c