diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-17 21:53:29 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-03-21 02:29:48 +0100 |
commit | 2a152ad3a58508b06b9e0482e68117a79bbb27ce (patch) | |
tree | fd80467e9b4cbeb163eb58239e9400c22946ef84 /fs/configfs/mount.c | |
parent | configfs: configfs_create_dir() has parent dentry in dentry->d_parent (diff) | |
download | linux-2a152ad3a58508b06b9e0482e68117a79bbb27ce.tar.xz linux-2a152ad3a58508b06b9e0482e68117a79bbb27ce.zip |
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/mount.c')
-rw-r--r-- | fs/configfs/mount.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c index cc829fc85d77..aee0a7ebbd8e 100644 --- a/fs/configfs/mount.c +++ b/fs/configfs/mount.c @@ -37,7 +37,7 @@ /* Random magic number */ #define CONFIGFS_MAGIC 0x62656570 -struct vfsmount * configfs_mount = NULL; +static struct vfsmount *configfs_mount = NULL; struct kmem_cache *configfs_dir_cachep; static int configfs_mnt_count = 0; @@ -115,10 +115,11 @@ static struct file_system_type configfs_fs_type = { .kill_sb = kill_litter_super, }; -int configfs_pin_fs(void) +struct dentry *configfs_pin_fs(void) { - return simple_pin_fs(&configfs_fs_type, &configfs_mount, + int err = simple_pin_fs(&configfs_fs_type, &configfs_mount, &configfs_mnt_count); + return err ? ERR_PTR(err) : configfs_mount->mnt_root; } void configfs_release_fs(void) |