summaryrefslogtreecommitdiffstats
path: root/fs/configfs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-03-17 16:53:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-03-20 21:29:48 -0400
commit2a152ad3a58508b06b9e0482e68117a79bbb27ce (patch)
treefd80467e9b4cbeb163eb58239e9400c22946ef84 /fs/configfs/dir.c
parent0dd6c08a0042ed83037cf5c772d9066e33046427 (diff)
downloadlinux-2a152ad3a58508b06b9e0482e68117a79bbb27ce.tar.bz2
make configfs_pin_fs() return root dentry on success
... and make configfs_mnt static Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/configfs/dir.c')
-rw-r--r--fs/configfs/dir.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 6c560e77965c..7e6c52d8a207 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -1075,16 +1075,15 @@ int configfs_depend_item(struct configfs_subsystem *subsys,
* Pin the configfs filesystem. This means we can safely access
* the root of the configfs filesystem.
*/
- ret = configfs_pin_fs();
- if (ret)
- return ret;
+ root = configfs_pin_fs();
+ if (IS_ERR(root))
+ return PTR_ERR(root);
/*
* Next, lock the root directory. We're going to check that the
* subsystem is really registered, and so we need to lock out
* configfs_[un]register_subsystem().
*/
- root = configfs_mount->mnt_root;
mutex_lock(&root->d_inode->i_mutex);
root_sd = root->d_fsdata;
@@ -1673,14 +1672,13 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys)
struct dentry *root;
struct configfs_dirent *sd;
- err = configfs_pin_fs();
- if (err)
- return err;
+ root = configfs_pin_fs();
+ if (IS_ERR(root))
+ return PTR_ERR(root);
if (!group->cg_item.ci_name)
group->cg_item.ci_name = group->cg_item.ci_namebuf;
- root = configfs_mount->mnt_root;
sd = root->d_fsdata;
link_group(to_config_group(sd->s_element), group);