Re: [PATCH] tracing: remove unreachable trace_array_put

From: Nikita Kiryushin
Date: Mon Jul 15 2024 - 09:48:01 EST


As nonseekable_open() documentation states:
"The function is not supposed to ever fail, the only
reason it returns an 'int' and not 'void' is so that it can be plugged
directly into file_operations structure."

So it seems, that it will not fail anytime as it is not meant to? Otherwise,
there will be a huge problem with leaks in many other parts of code, as
there are plenty of places, where nonseekable_open() is not checked after
resource allocations.

On 7/13/24 02:33, Steven Rostedt wrote:
Then why does it return a value?

If someday it can return a failure, this would then cause a leak. It
doesn't hurt to leave it in.

So NACK.

-- Steve