diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-04-26 04:31:28 -0400 |
commit | ef2e58ea6b9931c3a4816c66593da49bb20e3b24 (patch) | |
tree | ce7432add3becbe78de4ea06425cd2d9e91f4ada /fs/configfs | |
parent | 06d63cc51d47f572009138a7f3ac34d95773405d (diff) | |
parent | de46c33745f5e2ad594c72f2cf5f490861b16ce1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/configfs')
-rw-r--r-- | fs/configfs/dir.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 34750d5e4ff2..5e6e37e58f36 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
@@ -1141,25 +1141,22 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys) | |||
1141 | 1141 | ||
1142 | err = -ENOMEM; | 1142 | err = -ENOMEM; |
1143 | dentry = d_alloc(configfs_sb->s_root, &name); | 1143 | dentry = d_alloc(configfs_sb->s_root, &name); |
1144 | if (!dentry) | 1144 | if (dentry) { |
1145 | goto out_release; | 1145 | d_add(dentry, NULL); |
1146 | |||
1147 | d_add(dentry, NULL); | ||
1148 | 1146 | ||
1149 | err = configfs_attach_group(sd->s_element, &group->cg_item, | 1147 | err = configfs_attach_group(sd->s_element, &group->cg_item, |
1150 | dentry); | 1148 | dentry); |
1151 | if (!err) | 1149 | if (err) { |
1152 | dentry = NULL; | 1150 | d_delete(dentry); |
1153 | else | 1151 | dput(dentry); |
1154 | d_delete(dentry); | 1152 | } |
1153 | } | ||
1155 | 1154 | ||
1156 | mutex_unlock(&configfs_sb->s_root->d_inode->i_mutex); | 1155 | mutex_unlock(&configfs_sb->s_root->d_inode->i_mutex); |
1157 | 1156 | ||
1158 | if (dentry) { | 1157 | if (err) { |
1159 | dput(dentry); | 1158 | unlink_group(group); |
1160 | out_release: | 1159 | configfs_release_fs(); |
1161 | unlink_group(group); | ||
1162 | configfs_release_fs(); | ||
1163 | } | 1160 | } |
1164 | 1161 | ||
1165 | return err; | 1162 | return err; |