diff options
-rw-r--r-- | fs/configfs/dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 3313dd19f543..b11d7342eef2 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
@@ -689,7 +689,8 @@ static int create_default_group(struct config_group *parent_group, | |||
689 | sd = child->d_fsdata; | 689 | sd = child->d_fsdata; |
690 | sd->s_type |= CONFIGFS_USET_DEFAULT; | 690 | sd->s_type |= CONFIGFS_USET_DEFAULT; |
691 | } else { | 691 | } else { |
692 | d_delete(child); | 692 | BUG_ON(child->d_inode); |
693 | d_drop(child); | ||
693 | dput(child); | 694 | dput(child); |
694 | } | 695 | } |
695 | } | 696 | } |
@@ -1683,7 +1684,8 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys) | |||
1683 | err = configfs_attach_group(sd->s_element, &group->cg_item, | 1684 | err = configfs_attach_group(sd->s_element, &group->cg_item, |
1684 | dentry); | 1685 | dentry); |
1685 | if (err) { | 1686 | if (err) { |
1686 | d_delete(dentry); | 1687 | BUG_ON(dentry->d_inode); |
1688 | d_drop(dentry); | ||
1687 | dput(dentry); | 1689 | dput(dentry); |
1688 | } else { | 1690 | } else { |
1689 | spin_lock(&configfs_dirent_lock); | 1691 | spin_lock(&configfs_dirent_lock); |