aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/inode.c b/fs/inode.c
index e193cd592fa8..901bad1e5f12 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -675,12 +675,17 @@ void unlock_new_inode(struct inode *inode)
675 if (inode->i_mode & S_IFDIR) { 675 if (inode->i_mode & S_IFDIR) {
676 struct file_system_type *type = inode->i_sb->s_type; 676 struct file_system_type *type = inode->i_sb->s_type;
677 677
678 /* 678 /* Set new key only if filesystem hasn't already changed it */
679 * ensure nobody is actually holding i_mutex 679 if (!lockdep_match_class(&inode->i_mutex,
680 */ 680 &type->i_mutex_key)) {
681 mutex_destroy(&inode->i_mutex); 681 /*
682 mutex_init(&inode->i_mutex); 682 * ensure nobody is actually holding i_mutex
683 lockdep_set_class(&inode->i_mutex, &type->i_mutex_dir_key); 683 */
684 mutex_destroy(&inode->i_mutex);
685 mutex_init(&inode->i_mutex);
686 lockdep_set_class(&inode->i_mutex,
687 &type->i_mutex_dir_key);
688 }
684 } 689 }
685#endif 690#endif
686 /* 691 /*