diff --git a/infrastructure/longhorn/hotfix-7183.yaml b/infrastructure/longhorn/hotfix-7183.yaml
index fad6c3d08d99f40799a566cb1a96a47cfdb144f0..ca4055692cf04ad505bab2222dffc59b7c41295e 100644
--- a/infrastructure/longhorn/hotfix-7183.yaml
+++ b/infrastructure/longhorn/hotfix-7183.yaml
@@ -24,7 +24,7 @@ spec:
               - -c
               - |
                 for i in $(kubectl get lhsm -n longhorn-system --no-headers -o custom-columns=NAME:metadata.name); do 
-                  if kubectl get pods --no-headers -n longhorn-system "share-manager-$i" | grep -v Running; then 
+                  if ! kubectl get pods --no-headers -n longhorn-system "share-manager-$i" | grep Running; then
                     kubectl patch lhsm -n longhorn-system --type=merge --subresource status --patch 'status: {state: error}' $i
                   fi
                 done