aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 5cf366965d0c..66a416b42c18 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1460,9 +1460,9 @@ static int cgroup_get_rootdir(struct super_block *sb)
1460 return 0; 1460 return 0;
1461} 1461}
1462 1462
1463static int cgroup_get_sb(struct file_system_type *fs_type, 1463static struct dentry *cgroup_mount(struct file_system_type *fs_type,
1464 int flags, const char *unused_dev_name, 1464 int flags, const char *unused_dev_name,
1465 void *data, struct vfsmount *mnt) 1465 void *data)
1466{ 1466{
1467 struct cgroup_sb_opts opts; 1467 struct cgroup_sb_opts opts;
1468 struct cgroupfs_root *root; 1468 struct cgroupfs_root *root;
@@ -1596,10 +1596,9 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
1596 drop_parsed_module_refcounts(opts.subsys_bits); 1596 drop_parsed_module_refcounts(opts.subsys_bits);
1597 } 1597 }
1598 1598
1599 simple_set_mnt(mnt, sb);
1600 kfree(opts.release_agent); 1599 kfree(opts.release_agent);
1601 kfree(opts.name); 1600 kfree(opts.name);
1602 return 0; 1601 return dget(sb->s_root);
1603 1602
1604 drop_new_super: 1603 drop_new_super:
1605 deactivate_locked_super(sb); 1604 deactivate_locked_super(sb);
@@ -1608,7 +1607,7 @@ static int cgroup_get_sb(struct file_system_type *fs_type,
1608 out_err: 1607 out_err:
1609 kfree(opts.release_agent); 1608 kfree(opts.release_agent);
1610 kfree(opts.name); 1609 kfree(opts.name);
1611 return ret; 1610 return ERR_PTR(ret);
1612} 1611}
1613 1612
1614static void cgroup_kill_sb(struct super_block *sb) { 1613static void cgroup_kill_sb(struct super_block *sb) {
@@ -1658,7 +1657,7 @@ static void cgroup_kill_sb(struct super_block *sb) {
1658 1657
1659static struct file_system_type cgroup_fs_type = { 1658static struct file_system_type cgroup_fs_type = {
1660 .name = "cgroup", 1659 .name = "cgroup",
1661 .get_sb = cgroup_get_sb, 1660 .mount = cgroup_mount,
1662 .kill_sb = cgroup_kill_sb, 1661 .kill_sb = cgroup_kill_sb,
1663}; 1662};
1664 1663