diff --git a/fs/super.c b/fs/super.c index 89afca5055ab..69688b15f1fa 100644 --- a/fs/super.c +++ b/fs/super.c @@ -88,6 +88,7 @@ static struct super_block *alloc_super(struct file_system_type *type) s->s_count = 1; atomic_set(&s->s_active, 1); mutex_init(&s->s_vfs_rename_mutex); + lockdep_set_class(&s->s_vfs_rename_mutex, &type->s_vfs_rename_key); mutex_init(&s->s_dquot.dqio_mutex); mutex_init(&s->s_dquot.dqonoff_mutex); init_rwsem(&s->s_dquot.dqptr_sem); diff --git a/include/linux/fs.h b/include/linux/fs.h index f3e108314c93..9626c5fbb0e1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1741,6 +1741,7 @@ struct file_system_type { struct lock_class_key s_lock_key; struct lock_class_key s_umount_key; + struct lock_class_key s_vfs_rename_key; struct lock_class_key i_lock_key; struct lock_class_key i_mutex_key;