diff options
| author | Niklas Cassel <cassel@kernel.org> | 2026-10-22 11:22:02 +0200 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-11-03 07:11:35 -0700 |
| commit | 304b850e02fbbd72974a2bd0f88b0510f14867a9 (patch) | |
| tree | dcbd081bf5f93f0f0567bcb93affdbc5d83d6cf5 /scripts/livepatch | |
| parent | 973bf587d79f061beffdd392e77012a07f25fcd6 (diff) | |
null_blk: clean up setting zones read-only or offline
null_set_zone_cond() takes a zone condition, even though read-only and
offline are the only zone conditions that it can set. Because of this,
it needs a WARN_ON_ONCE() to reject any other zone condition, and its
name suggests a generic helper that can set any zone condition.
Rename null_set_zone_cond() to null_set_zone_readonly_or_offline(), and
replace its zone condition argument with a bool, set_offline, which
selects between the read-only and offline conditions. Also remove the
comment above the function, as it only repeats the new function name.
zone_cond_store() keeps taking a zone condition, as it, unlike
null_set_zone_readonly_or_offline(), contains generic code, and might
be extended to support additional zone conditions in the future.
No functional change, as zone_cond_store() is only called with the
read-only or offline condition.
Suggested-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://patch.msgid.link/20261022092158.2248831-8-cassel@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/livepatch')
0 files changed, 0 insertions, 0 deletions
