drm/i915: Update ifdeffery for mutex->owner
In commit7608a43d8f
("locking/mutexes: Use MUTEX_SPIN_ON_OWNER when appropriate") the owner field in the mutex was updated from being dependent upon CONFIG_SMP to using optimistic spin. Update our peek function to suite. Fixes:7608a43d8f2e ("locking/mutexes: Use MUTEX_SPIN_ON_OWNER...") Reported-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1468244777-4888-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld <matthew.auld@intel.com> (cherry picked from commit4f074a5393
) Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
cab1032743
commit
b192400627
|
@ -40,7 +40,7 @@ static bool mutex_is_locked_by(struct mutex *mutex, struct task_struct *task)
|
||||||
if (!mutex_is_locked(mutex))
|
if (!mutex_is_locked(mutex))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_MUTEXES)
|
#if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_MUTEX_SPIN_ON_OWNER)
|
||||||
return mutex->owner == task;
|
return mutex->owner == task;
|
||||||
#else
|
#else
|
||||||
/* Since UP may be pre-empted, we cannot assume that we own the lock */
|
/* Since UP may be pre-empted, we cannot assume that we own the lock */
|
||||||
|
|
Loading…
Reference in New Issue