Whamcloud - gitweb
LU-13264 osc: ensure lu_ref work atomic from osc_lock_upcall()
[fs/lustre-release.git] / lustre / ldlm / ldlm_lock.c
index 94445d3..11af749 100644 (file)
@@ -617,7 +617,7 @@ struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *handle,
        /* It's unlikely but possible that someone marked the lock as
         * destroyed after we did handle2object on it */
        if ((flags == 0) && !ldlm_is_destroyed(lock)) {
        /* It's unlikely but possible that someone marked the lock as
         * destroyed after we did handle2object on it */
        if ((flags == 0) && !ldlm_is_destroyed(lock)) {
-               lu_ref_add(&lock->l_reference, "handle", current);
+               lu_ref_add_atomic(&lock->l_reference, "handle", current);
                RETURN(lock);
        }
 
                RETURN(lock);
        }