[PATCH] xfs: fix double mutex_lock() call in xfs_ioc_health_monitor()
From: Shigeru Yoshida
Date: Thu Sep 10 2026 - 09:48:18 EST
Commit 4870da4f49ae ("xfs: take hm->lock in xfs_ioc_health_monitor()
before insert") intended to protect the __xfs_healthmon_insert() call
with hm->lock, but the second mutex operation was accidentally left as
mutex_lock() instead of mutex_unlock(), causing self-deadlock. Change
the second call to mutex_unlock() as originally intended.
Fixes: 4870da4f49ae ("xfs: take hm->lock in xfs_ioc_health_monitor() before insert")
Signed-off-by: Shigeru Yoshida <syoshida@xxxxxxxxxx>
---
fs/xfs/xfs_healthmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_healthmon.c b/fs/xfs/xfs_healthmon.c
index 6dc3f69d6798..c3749675ef19 100644
--- a/fs/xfs/xfs_healthmon.c
+++ b/fs/xfs/xfs_healthmon.c
@@ -1225,7 +1225,7 @@ xfs_ioc_health_monitor(
running_event->domain = XFS_HEALTHMON_MOUNT;
mutex_lock(&hm->lock);
__xfs_healthmon_insert(hm, INSERT_HEAD, running_event);
- mutex_lock(&hm->lock);
+ mutex_unlock(&hm->lock);
/*
* Preallocate the unmount event so that we can't fail to notify the
--
2.55.0