Re: [PATCH v5 01/14] sched/debug: Fix updating of ppos on server write ops

From: Tejun Heo
Date: Mon Jun 23 2025 - 16:14:48 EST


On Fri, Jun 20, 2025 at 04:32:16PM -0400, Joel Fernandes wrote:
> Updating "ppos" on error conditions does not make much sense. The pattern
> is to return the error code directly without modifying the position, or
> modify the position on success and return the number of bytes written.
>
> Since on success, the return value of apply is 0, there is no point in
> modifying ppos either. Fix it by removing all this and just returning
> error code or number of bytes written on success.
>
> Reviewed-by: Andrea Righi <arighi@xxxxxxxxxx>
> Signed-off-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun