[lkml]   [2011]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 13/20] lockdep, mutex: Provide mutex_lock_nest_lock
On Tue, 2011-04-19 at 13:06 -0700, Andrew Morton wrote:
> On Fri, 01 Apr 2011 14:13:11 +0200
> Peter Zijlstra <> wrote:
> > Provide the mutex_lock_nest_lock() annotation.
> why?
> Neither the changelog nor the code provide any documentation for this addition to
> the lokdep API.

Subject: lockdep, mutex: Provide mutex_lock_nest_lock
From: Peter Zijlstra <>
Date: Fri, 26 Nov 2010 15:39:00 +0100

In order to convert i_mmap_lock to a mutex we need a mutex equivalent
to spin_lock_nest_lock(), thus provide the mutex_lock_nest_lock()

As with spin_lock_nest_lock(), mutex_lock_nest_lock() allows
annotation of the locking pattern where an outer lock serializes the
acquisition order of nested locks. That is, if every time you lock
multiple locks A, say A1 and A2 you first acquire N, the order of
acquiring A1 and A2 is irrelevant.

Signed-off-by: Peter Zijlstra <>

 \ /
  Last update: 2011-04-20 13:07    [W:0.134 / U:5.384 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site