cgroup/cpuset: Fix error handling in remote_partition_disable()
authorWaiman Long <longman@redhat.com>
Sun, 30 Mar 2025 21:52:41 +0000 (17:52 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 31 Mar 2025 23:25:38 +0000 (13:25 -1000)
commit8bf450f3aec3d1bbd725d179502c64b8992588e4
tree5d8483865ae440162c5a5f52b321db241f1d50d5
parent668e041662e92ab3ebcb9eb606d3ec01884546ab
cgroup/cpuset: Fix error handling in remote_partition_disable()

When remote_partition_disable() is called to disable a remote partition,
it always sets the partition to an invalid partition state. It should
only do so if an error code (prs_err) has been set. Correct that and
add proper error code in places where remote_partition_disable() is
called due to error.

Fixes: 181c8e091aae ("cgroup/cpuset: Introduce remote partition")
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c