[PATCH] fixup! dax/kmem: add sysfs interface for atomic whole-device hotplug

From: Gregory Price

Date: Tue Jun 30 2026 - 17:49:06 EST


---
drivers/dax/kmem.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 19effe0da3dc..f597d8a99c1f 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -380,8 +380,11 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr,
return rc;

rc = dax_kmem_do_hotplug(dev_dax, data, online_type);
- if (rc < 0)
+ if (rc < 0) {
+ /* Total failure, drop the reservations we took. */
+ dax_kmem_cleanup_resources(dev_dax, data);
return rc;
+ }

data->state = online_type;
return len;
--
2.53.0-Meta


--Ha7M+e+kLoFbO4pS--