From: Arjan van de Ven <arjan@linux.intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>,
reiserfs-list@namesys.com, reiserfs-dev@namesys.com,
viro@ftp.linux.org.uk, viro@zeniv.linux.org.uk,
reiser@namesys.com, linux-kernel@vger.kernel.org,
Jesper Juhl <jesper.juhl@gmail.com>
Subject: [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode
Date: Wed, 26 Jul 2006 08:32:04 +0200 [thread overview]
Message-ID: <1153895524.2896.2.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20060725223327.b6d039b2.akpm@osdl.org>
> 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@linux.intel.com>
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;
next prev parent reply other threads:[~2006-07-26 6:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-25 22:16 possible recursive locking detected - while running fs operations in loops - 2.6.18-rc2-git5 Jesper Juhl
2006-07-25 23:29 ` Andreas Dilger
2006-07-29 22:18 ` Jesper Juhl
2006-07-29 23:08 ` Hans Reiser
2006-07-30 6:17 ` Jesper Juhl
2006-07-30 0:46 ` Hans Reiser
2006-07-30 10:08 ` Jesper Juhl
2006-07-31 19:34 ` Alexander Zarochentsev
2006-07-26 5:33 ` Andrew Morton
2006-07-26 6:32 ` Arjan van de Ven [this message]
2006-07-26 6:38 ` [patch] lockdep: annotate vfs_rmdir for filesystems that take i_mutex in delete_inode Arjan van de Ven
2006-07-26 6:47 ` Arjan van de Ven
2006-07-26 7:04 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1153895524.2896.2.camel@laptopd505.fenrus.org \
--to=arjan@linux.intel.com \
--cc=akpm@osdl.org \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=reiser@namesys.com \
--cc=reiserfs-dev@namesys.com \
--cc=reiserfs-list@namesys.com \
--cc=viro@ftp.linux.org.uk \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®