diff options
-rw-r--r-- | kernel/cgroup.c | 11 | ||||
-rw-r--r-- | kernel/cpuset.c | 13 |
2 files changed, 11 insertions, 13 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 | ||
1463 | static int cgroup_get_sb(struct file_system_type *fs_type, | 1463 | static 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 | ||
1614 | static void cgroup_kill_sb(struct super_block *sb) { | 1613 | static void cgroup_kill_sb(struct super_block *sb) { |
@@ -1658,7 +1657,7 @@ static void cgroup_kill_sb(struct super_block *sb) { | |||
1658 | 1657 | ||
1659 | static struct file_system_type cgroup_fs_type = { | 1658 | static 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 | ||
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 51b143e2a07a..4349935c2ad8 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -231,18 +231,17 @@ static DEFINE_SPINLOCK(cpuset_buffer_lock); | |||
231 | * users. If someone tries to mount the "cpuset" filesystem, we | 231 | * users. If someone tries to mount the "cpuset" filesystem, we |
232 | * silently switch it to mount "cgroup" instead | 232 | * silently switch it to mount "cgroup" instead |
233 | */ | 233 | */ |
234 | static int cpuset_get_sb(struct file_system_type *fs_type, | 234 | static struct dentry *cpuset_mount(struct file_system_type *fs_type, |
235 | int flags, const char *unused_dev_name, | 235 | int flags, const char *unused_dev_name, void *data) |
236 | void *data, struct vfsmount *mnt) | ||
237 | { | 236 | { |
238 | struct file_system_type *cgroup_fs = get_fs_type("cgroup"); | 237 | struct file_system_type *cgroup_fs = get_fs_type("cgroup"); |
239 | int ret = -ENODEV; | 238 | struct dentry *ret = ERR_PTR(-ENODEV); |
240 | if (cgroup_fs) { | 239 | if (cgroup_fs) { |
241 | char mountopts[] = | 240 | char mountopts[] = |
242 | "cpuset,noprefix," | 241 | "cpuset,noprefix," |
243 | "release_agent=/sbin/cpuset_release_agent"; | 242 | "release_agent=/sbin/cpuset_release_agent"; |
244 | ret = cgroup_fs->get_sb(cgroup_fs, flags, | 243 | ret = cgroup_fs->mount(cgroup_fs, flags, |
245 | unused_dev_name, mountopts, mnt); | 244 | unused_dev_name, mountopts); |
246 | put_filesystem(cgroup_fs); | 245 | put_filesystem(cgroup_fs); |
247 | } | 246 | } |
248 | return ret; | 247 | return ret; |
@@ -250,7 +249,7 @@ static int cpuset_get_sb(struct file_system_type *fs_type, | |||
250 | 249 | ||
251 | static struct file_system_type cpuset_fs_type = { | 250 | static struct file_system_type cpuset_fs_type = { |
252 | .name = "cpuset", | 251 | .name = "cpuset", |
253 | .get_sb = cpuset_get_sb, | 252 | .mount = cpuset_mount, |
254 | }; | 253 | }; |
255 | 254 | ||
256 | /* | 255 | /* |