Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e89a5e15a2c88b3fd1ed3fa17fd767efe44727a Commit: 1e89a5e15a2c88b3fd1ed3fa17fd767efe44727a Parent: e744fdea546abf7a794898a99a26f85c63a83648 Author: Peter Zijlstra <[EMAIL PROTECTED]> AuthorDate: Tue Oct 16 06:47:54 2007 +0200 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue Oct 16 10:01:50 2007 -0700
lockdep: fixup the inode dir annotation A slight oversight tripped lockdep debugging code, each lockdep class should have but a single init site. Rearange the code to make this true. Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/inode.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index f97de0a..21dab18 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -568,16 +568,16 @@ EXPORT_SYMBOL(new_inode); void unlock_new_inode(struct inode *inode) { #ifdef CONFIG_DEBUG_LOCK_ALLOC - struct file_system_type *type = inode->i_sb->s_type; - /* - * ensure nobody is actually holding i_mutex - */ - mutex_destroy(&inode->i_mutex); - mutex_init(&inode->i_mutex); - if (inode->i_mode & S_IFDIR) + if (inode->i_mode & S_IFDIR) { + struct file_system_type *type = inode->i_sb->s_type; + + /* + * ensure nobody is actually holding i_mutex + */ + mutex_destroy(&inode->i_mutex); + mutex_init(&inode->i_mutex); lockdep_set_class(&inode->i_mutex, &type->i_mutex_dir_key); - else - lockdep_set_class(&inode->i_mutex, &type->i_mutex_key); + } #endif /* * This is special! We do not need the spinlock - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html