Whamcloud - gitweb
LU-11185 mgc: config lock leak
[fs/lustre-release.git] / lustre / ldlm / ldlm_lock.c
index 3bdf02b..b8e3989 100644 (file)
@@ -600,7 +600,11 @@ struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,
 
        LASSERT(handle);
 
+       if (!lustre_handle_is_used(handle))
+               RETURN(NULL);
+
        lock = class_handle2object(handle->cookie, &lock_handle_ops);
+
        if (lock == NULL)
                RETURN(NULL);