OSDN Git Service

cxl/region: Drop redundant pmem region release handling
authorDan Williams <dan.j.williams@intel.com>
Thu, 1 Dec 2022 21:33:32 +0000 (13:33 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sat, 3 Dec 2022 07:06:29 +0000 (23:06 -0800)
commit16d53cb0d6900ba7c5920397480016d3ee844610
tree73af5b85b3d283fc6413450adfe0f009dbb2f605
parentcb9cfff82f6a862c1f54b8b01d9d9a979bb8ae78
cxl/region: Drop redundant pmem region release handling

Now that a cxl_nvdimm object can only experience ->remove() via an
unregistration event (because the cxl_nvdimm bind attributes are
suppressed), additional cleanups are possible.

It is already the case that the removal of a cxl_memdev object triggers
->remove() on any associated region. With that mechanism in place there
is no need for the cxl_nvdimm removal to trigger the same. Just rely on
cxl_region_detach() to tear down the whole cxl_pmem_region.

Tested-by: Robert Richter <rrichter@amd.com>
Link: https://lore.kernel.org/r/166993041215.1882361.6321535567798911286.stgit@dwillia2-xfh.jf.intel.com
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/pmem.c
drivers/cxl/cxl.h
drivers/cxl/pmem.c