[lvc-project] [PATCH] tracing: remove unreachable trace_array_put

Nikita Kiryushin kiryushin at ancud.ru
Mon Jul 15 16:47:36 MSK 2024


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
>




More information about the lvc-project mailing list