diff options
Diffstat (limited to 'fs/configfs')
| -rw-r--r-- | fs/configfs/dir.c | 5 | ||||
| -rw-r--r-- | fs/configfs/file.c | 2 |
2 files changed, 4 insertions, 3 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); |
diff --git a/fs/configfs/file.c b/fs/configfs/file.c index a3658f9a082c..397cb503a180 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c | |||
| @@ -320,7 +320,7 @@ int configfs_add_file(struct dentry * dir, const struct configfs_attribute * att | |||
| 320 | umode_t mode = (attr->ca_mode & S_IALLUGO) | S_IFREG; | 320 | umode_t mode = (attr->ca_mode & S_IALLUGO) | S_IFREG; |
| 321 | int error = 0; | 321 | int error = 0; |
| 322 | 322 | ||
| 323 | mutex_lock(&dir->d_inode->i_mutex); | 323 | mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_NORMAL); |
| 324 | error = configfs_make_dirent(parent_sd, NULL, (void *) attr, mode, type); | 324 | error = configfs_make_dirent(parent_sd, NULL, (void *) attr, mode, type); |
| 325 | mutex_unlock(&dir->d_inode->i_mutex); | 325 | mutex_unlock(&dir->d_inode->i_mutex); |
| 326 | 326 | ||
