[Intel-gfx] [PATCH] drm/i915: fix wrong ifdef condition for mutex owner

Hong Liu hong.liu at intel.com
Mon Jul 11 13:29:59 UTC 2016


Got compiling error if disabling MUTEX_SPIN_ON_OWNER and DEBUG_MUTEXES:

drivers/gpu/drm/i915/i915_gem_shrinker.c:44:14: error: 'struct mutex' has
no member named 'owner'.

Signed-off-by: Hong Liu <hong.liu at intel.com>
---
 drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
index 067632a..0066b9c 100644
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@ -40,7 +40,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
 	if (!mutex_is_locked(mutex))
 		return false;
 
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
+#if defined(CONFIG_SMP) && defined(CONFIG_DEBUG_MUTEXES)
 	return mutex->owner == task;
 #else
 	/* Since UP may be pre-empted, we cannot assume that we own the lock */
-- 
2.7.4



More information about the Intel-gfx mailing list