提交 4df46240 编写于 作者: I Ingo Molnar 提交者: Linus Torvalds

[PATCH] lockdep: annotate reiserfs

reiserfs seems to have another locking level layer for the i_mutex due to the
xattrs-are-a-directory thing.
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 36e8e578
...@@ -424,7 +424,7 @@ int xattr_readdir(struct file *file, filldir_t filler, void *buf) ...@@ -424,7 +424,7 @@ int xattr_readdir(struct file *file, filldir_t filler, void *buf)
int res = -ENOTDIR; int res = -ENOTDIR;
if (!file->f_op || !file->f_op->readdir) if (!file->f_op || !file->f_op->readdir)
goto out; goto out;
mutex_lock(&inode->i_mutex); mutex_lock_nested(&inode->i_mutex, I_MUTEX_XATTR);
// down(&inode->i_zombie); // down(&inode->i_zombie);
res = -ENOENT; res = -ENOENT;
if (!IS_DEADDIR(inode)) { if (!IS_DEADDIR(inode)) {
......
...@@ -570,13 +570,14 @@ struct inode { ...@@ -570,13 +570,14 @@ struct inode {
* 3: quota file * 3: quota file
* *
* The locking order between these classes is * The locking order between these classes is
* parent -> child -> normal -> quota * parent -> child -> normal -> xattr -> quota
*/ */
enum inode_i_mutex_lock_class enum inode_i_mutex_lock_class
{ {
I_MUTEX_NORMAL, I_MUTEX_NORMAL,
I_MUTEX_PARENT, I_MUTEX_PARENT,
I_MUTEX_CHILD, I_MUTEX_CHILD,
I_MUTEX_XATTR,
I_MUTEX_QUOTA I_MUTEX_QUOTA
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册