diff options
author | Chen Ridong <chenridong@huawei.com> | 2025-09-17 06:04:51 +0000 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2025-09-17 08:37:31 -1000 |
commit | c6366739804f836ac88474527430d3fd174580eb (patch) | |
tree | 38ba0325b8a5a2a947262c1a8dc4ff43642ca51c /rust/helpers/atomic.c | |
parent | 7e05981ba34a214fd43a2e4d776bc6b0c235e2fb (diff) |
cpuset: refactor cpus_allowed_validate_change
Refactor cpus_allowed_validate_change to handle the special case where
cpuset.cpus can be set even when violating partition sibling CPU
exclusivity rules. This differs from the general validation logic in
validate_change. Add a wrapper function to properly handle this
exceptional case.
The trialcs->prs_err field is cleared before performing validation checks
for both CPU changes and partition errors. If cpus_allowed_validate_change
fails its validation, trialcs->prs_err is set to PERR_NOTEXCL. If partition
validation fails, the specific error code returned by validate_partition
is assigned to trialcs->prs_err.
With the partition validation status now directly available through
trialcs->prs_err, the local boolean variable 'invalidate' becomes
redundant and can be safely removed.
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/helpers/atomic.c')
0 files changed, 0 insertions, 0 deletions