diff options
Diffstat (limited to 'fs/configfs')
-rw-r--r-- | fs/configfs/dir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 50ed691098bc..a48dc7dd8765 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
@@ -546,7 +546,7 @@ static int populate_groups(struct config_group *group) | |||
546 | * That said, taking our i_mutex is closer to mkdir | 546 | * That said, taking our i_mutex is closer to mkdir |
547 | * emulation, and shouldn't hurt. | 547 | * emulation, and shouldn't hurt. |
548 | */ | 548 | */ |
549 | mutex_lock(&dentry->d_inode->i_mutex); | 549 | mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); |
550 | 550 | ||
551 | for (i = 0; group->default_groups[i]; i++) { | 551 | for (i = 0; group->default_groups[i]; i++) { |
552 | new_group = group->default_groups[i]; | 552 | new_group = group->default_groups[i]; |
@@ -1405,7 +1405,8 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys) | |||
1405 | sd = configfs_sb->s_root->d_fsdata; | 1405 | sd = configfs_sb->s_root->d_fsdata; |
1406 | link_group(to_config_group(sd->s_element), group); | 1406 | link_group(to_config_group(sd->s_element), group); |
1407 | 1407 | ||
1408 | mutex_lock(&configfs_sb->s_root->d_inode->i_mutex); | 1408 | mutex_lock_nested(&configfs_sb->s_root->d_inode->i_mutex, |
1409 | I_MUTEX_PARENT); | ||
1409 | 1410 | ||
1410 | name.name = group->cg_item.ci_name; | 1411 | name.name = group->cg_item.ci_name; |
1411 | name.len = strlen(name.name); | 1412 | name.len = strlen(name.name); |