mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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:
parent
a90b9c05df
commit
f2eace23e9
3 changed files with 30 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue