[PATCH] lockdep: annotate i_mutex
Teach special (recursive) locking code to the lock validator. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
a90b9c05df
commit
f2eace23e9
@@ -542,6 +542,25 @@ struct inode {
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* inode->i_mutex nesting subclasses for the lock validator:
|
||||
*
|
||||
* 0: the object of the current VFS operation
|
||||
* 1: parent
|
||||
* 2: child/target
|
||||
* 3: quota file
|
||||
*
|
||||
* The locking order between these classes is
|
||||
* parent -> child -> normal -> quota
|
||||
*/
|
||||
enum inode_i_mutex_lock_class
|
||||
{
|
||||
I_MUTEX_NORMAL,
|
||||
I_MUTEX_PARENT,
|
||||
I_MUTEX_CHILD,
|
||||
I_MUTEX_QUOTA
|
||||
};
|
||||
|
||||
/*
|
||||
* NOTE: in a 32bit arch with a preemptable kernel and
|
||||
* an UP compile the i_size_read/write must be atomic
|
||||
|
Reference in New Issue
Block a user