[patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode
- From: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
- Date: Wed, 26 Jul 2006 08:32:04 +0200
The VFS takes the directory i_mutex and reiserfs_delete_inode() takes the
to-be-deleted file's i_mutex.
That's notabug and lockdep will need to be taught about it.
Actually the annotation is in vfs_rmdir() since that is where the parent
is taken (this may sound odd but the I_MUTEX_* ordering rules require
the parent taking to be annotated rather than the child)
Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
Index: linux-2.6.18-rc2-git5/fs/namei.c
===================================================================
--- linux-2.6.18-rc2-git5.orig/fs/namei.c
+++ linux-2.6.18-rc2-git5/fs/namei.c
@@ -1967,7 +1967,7 @@ int vfs_rmdir(struct inode *dir, struct
DQUOT_INIT(dir);
- mutex_lock(&dentry->d_inode->i_mutex);
+ mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_PARENT);
dentry_unhash(dentry);
if (d_mountpoint(dentry))
error = -EBUSY;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode
- From: Arjan van de Ven
- Re: [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode
- References:
- Prev by Date: Re: [PATCH] lockdep: don't pull in includes when lockdep disabled
- Next by Date: [PATCH 18-rc2] Fix typos in /Documentation : 'N'-'P'
- Previous by thread: Re: possible recursive locking detected - while running fs operations in loops - 2.6.18-rc2-git5
- Next by thread: Re: [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode
- Index(es):
Relevant Pages
|