Re: [patch V3 15/64] rtmutex: Provide rt_mutex_base_is_locked()

Davidlohr Bueso
2021-08-08T20:41:26Z

>+/**
>+ * rt_mutex_base_is_locked - is the rtmutex locked
>+ * @lock: the mutex to be queried
>+ *
>+ * Returns true if the mutex is locked, false if unlocked.
>+ */
>+static inline bool rt_mutex_base_is_locked(struct rt_mutex_base *lock)
>+{
>+ return lock->owner != NULL;

Does this want to be READ_ONCE()? While not a big deal because
it's ultimately only used by drm debugging, I don't see any harm
in avoiding potential tearing.

Thanks,
Davidlohr