diff options
author | Li Ming <ming.li@zohomail.com> | 2025-02-21 04:32:05 +0300 |
---|---|---|
committer | Dave Jiang <dave.jiang@intel.com> | 2025-03-15 00:59:34 +0300 |
commit | 5ec67596e368cdddddd6770fc2dd2e577e82fbe8 (patch) | |
tree | 267c5930e848216456b0796ec5539e51b286d2e9 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
parent | 9e7b7ab5af69aaa5cd027656529663407da61e6f (diff) | |
download | linux-5ec67596e368cdddddd6770fc2dd2e577e82fbe8.tar.xz |
cxl/region: Drop goto pattern of construct_region()
Some operations need to be protected by the cxl_region_rwsem in
construct_region(). Currently, construct_region() uses down_write() and
up_write() for the cxl_region_rwsem locking, so there is a goto pattern
after down_write() invoked to release cxl_region_rwsem.
construct region() can be optimized to remove the goto pattern. The
changes are creating a new function called __construct_region() which
will include all checking and operations protected by the
cxl_region_rwsem, and using guard(rwsem_write) to replace down_write()
and up_write() in __construct_region().
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Li Ming <ming.li@zohomail.com>
Link: https://patch.msgid.link/20250221013205.126419-1-ming.li@zohomail.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions