]> git.ipfire.org Git - thirdparty/linux.git/commit
sched/debug: Fix updating of ppos on server write ops
authorJoel Fernandes <joelagnelf@nvidia.com>
Mon, 26 Jan 2026 09:59:00 +0000 (10:59 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 3 Feb 2026 11:04:16 +0000 (12:04 +0100)
commit6080fb211672aec6ce8f2f5a2e0b4eae736f2027
treeed0f7543721ebcf5b8e5b11a55f598be16aaf679
parent3cb3b27693bf30defb16aa096158a3b24583b8d2
sched/debug: Fix updating of ppos on server write ops

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.

Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Juri Lelli <juri.lelli@redhat.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Acked-by: Tejun Heo <tj@kernel.org>
Tested-by: Christian Loehle <christian.loehle@arm.com>
Link: https://patch.msgid.link/20260126100050.3854740-3-arighi@nvidia.com
kernel/sched/debug.c