Skip to content

Commit

Permalink
Merge branch 'for-3.14-fixes' into for-3.15
Browse files Browse the repository at this point in the history
Pending kernfs conversion depends on fixes in for-3.14-fixes.  Pull it
into for-3.15.

Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Tejun Heo committed Feb 8, 2014
2 parents 3417ae1 + 48573a8 commit 1a698a4
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 17 deletions.
2 changes: 2 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2408,8 +2408,10 @@ F: tools/power/cpupower/

CPUSETS
M: Li Zefan <lizefan@huawei.com>
L: cgroups@vger.kernel.org
W: http://www.bullopensource.org/cpuset/
W: http://oss.sgi.com/projects/cpusets/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
S: Maintained
F: Documentation/cgroups/cpusets.txt
F: include/linux/cpuset.h
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-tegra/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/cpu_pm.h>
#include <linux/suspend.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/clk/tegra.h>

#include <asm/smp_plat.h>
Expand Down
1 change: 1 addition & 0 deletions fs/nfs/nfs3proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/lockd/bind.h>
#include <linux/nfs_mount.h>
#include <linux/freezer.h>
#include <linux/xattr.h>

#include "iostat.h"
#include "internal.h"
Expand Down
35 changes: 18 additions & 17 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1494,10 +1494,10 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type,
mutex_lock(&inode->i_mutex);
mutex_lock(&cgroup_mutex);

root_cgrp->id = idr_alloc(&root->cgroup_idr, root_cgrp,
0, 1, GFP_KERNEL);
if (root_cgrp->id < 0)
ret = idr_alloc(&root->cgroup_idr, root_cgrp, 0, 1, GFP_KERNEL);
if (ret < 0)
goto unlock_drop;
root_cgrp->id = ret;

/* Check for name clashes with existing mounts */
ret = -EBUSY;
Expand Down Expand Up @@ -2687,10 +2687,7 @@ static int cgroup_cfts_commit(struct cftype *cfts, bool is_add)
*/
update_before = cgroup_serial_nr_next;

mutex_unlock(&cgroup_mutex);

/* add/rm files for all cgroups created before */
rcu_read_lock();
css_for_each_descendant_pre(css, cgroup_css(root, ss)) {
struct cgroup *cgrp = css->cgroup;

Expand All @@ -2699,23 +2696,19 @@ static int cgroup_cfts_commit(struct cftype *cfts, bool is_add)

inode = cgrp->dentry->d_inode;
dget(cgrp->dentry);
rcu_read_unlock();

dput(prev);
prev = cgrp->dentry;

mutex_unlock(&cgroup_mutex);
mutex_lock(&inode->i_mutex);
mutex_lock(&cgroup_mutex);
if (cgrp->serial_nr < update_before && !cgroup_is_dead(cgrp))
ret = cgroup_addrm_files(cgrp, cfts, is_add);
mutex_unlock(&cgroup_mutex);
mutex_unlock(&inode->i_mutex);

rcu_read_lock();
if (ret)
break;
}
rcu_read_unlock();
mutex_unlock(&cgroup_mutex);
dput(prev);
deactivate_super(sb);
return ret;
Expand Down Expand Up @@ -4082,7 +4075,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
struct cgroup *cgrp;
struct cgroup_name *name;
struct cgroupfs_root *root = parent->root;
int ssid, err = 0;
int ssid, err;
struct cgroup_subsys *ss;
struct super_block *sb = root->sb;

Expand All @@ -4092,17 +4085,21 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
return -ENOMEM;

name = cgroup_alloc_name(dentry);
if (!name)
if (!name) {
err = -ENOMEM;
goto err_free_cgrp;
}
rcu_assign_pointer(cgrp->name, name);

/*
* Temporarily set the pointer to NULL, so idr_find() won't return
* a half-baked cgroup.
*/
cgrp->id = idr_alloc(&root->cgroup_idr, NULL, 1, 0, GFP_KERNEL);
if (cgrp->id < 0)
if (cgrp->id < 0) {
err = -ENOMEM;
goto err_free_name;
}

/*
* Only live parents can have children. Note that the liveliness
Expand Down Expand Up @@ -4589,12 +4586,16 @@ static int __init cgroup_wq_init(void)
/*
* There isn't much point in executing destruction path in
* parallel. Good chunk is serialized with cgroup_mutex anyway.
* Use 1 for @max_active.
*
* XXX: Must be ordered to make sure parent is offlined after
* children. The ordering requirement is for memcg where a
* parent's offline may wait for a child's leading to deadlock. In
* the long term, this should be fixed from memcg side.
*
* We would prefer to do this in cgroup_init() above, but that
* is called before init_workqueues(): so leave this until after.
*/
cgroup_destroy_wq = alloc_workqueue("cgroup_destroy", 0, 1);
cgroup_destroy_wq = alloc_ordered_workqueue("cgroup_destroy", 0);
BUG_ON(!cgroup_destroy_wq);

/*
Expand Down
1 change: 1 addition & 0 deletions kernel/power/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/kbd_kern.h>
#include <linux/vt.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "power.h"

#define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
Expand Down
1 change: 1 addition & 0 deletions mm/vmpressure.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/mm.h>
#include <linux/vmstat.h>
#include <linux/eventfd.h>
#include <linux/slab.h>
#include <linux/swap.h>
#include <linux/printk.h>
#include <linux/vmpressure.h>
Expand Down

0 comments on commit 1a698a4

Please sign in to comment.