diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-07-18 01:53:48 +0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2008-07-18 01:53:48 +0400 |
commit | f89ab8619e5320cc9c2576f5f8dcbaf6c0ba3950 (patch) | |
tree | e703050b232c76de7cb25afd63a2b4dd885c4bb9 /fs/configfs | |
parent | 5b664cb235e97afbf34db9c4d77f08ebd725335e (diff) | |
download | linux-f89ab8619e5320cc9c2576f5f8dcbaf6c0ba3950.tar.xz |
Revert "configfs: Allow ->make_item() and ->make_group() to return detailed errors."
This reverts commit 11c3b79218390a139f2d474ee1e983a672d5839a. The code
will move to PTR_ERR().
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/configfs')
-rw-r--r-- | fs/configfs/dir.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 0e64312a084c..614e382a6049 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -1073,24 +1073,25 @@ static int configfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) group = NULL; item = NULL; if (type->ct_group_ops->make_group) { - ret = type->ct_group_ops->make_group(to_config_group(parent_item), name, &group); - if (!ret) { + group = type->ct_group_ops->make_group(to_config_group(parent_item), name); + if (group) { link_group(to_config_group(parent_item), group); item = &group->cg_item; } } else { - ret = type->ct_group_ops->make_item(to_config_group(parent_item), name, &item); - if (!ret) + item = type->ct_group_ops->make_item(to_config_group(parent_item), name); + if (item) link_obj(parent_item, item); } mutex_unlock(&subsys->su_mutex); kfree(name); - if (ret) { + if (!item) { /* - * If ret != 0, then link_obj() was never called. + * If item == NULL, then link_obj() was never called. * There are no extra references to clean up. */ + ret = -ENOMEM; goto out_put; } |