Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339335
b: refs/heads/master
c: febfcef
h: refs/heads/master
i:
  339333: ecfe69f
  339331: c0b1890
  339327: 03f752c
v: v3
  • Loading branch information
Tejun Heo committed Nov 19, 2012
1 parent 0901c12 commit 09f0aa1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e139afc22cb98d0d032ffce0285bfcc73ca5217
refs/heads/master: febfcef60d4f9457785b45aab548bc7ee5ea158f
2 changes: 1 addition & 1 deletion trunk/include/linux/cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct cgroup {
struct list_head files; /* my files */

struct cgroup *parent; /* my parent */
struct dentry __rcu *dentry; /* cgroup fs entry, RCU protected */
struct dentry *dentry; /* cgroup fs entry, RCU protected */

/* Private pointers for each registered subsystem */
struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
Expand Down
11 changes: 6 additions & 5 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,9 +1756,11 @@ static struct kobject *cgroup_kobj;
*/
int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen)
{
struct dentry *dentry = cgrp->dentry;
char *start;
struct dentry *dentry = rcu_dereference_check(cgrp->dentry,
cgroup_lock_is_held());

rcu_lockdep_assert(rcu_read_lock_held() || cgroup_lock_is_held(),
"cgroup_path() called without proper locking");

if (!dentry || cgrp == dummytop) {
/*
Expand All @@ -1782,8 +1784,7 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen)
if (!cgrp)
break;

dentry = rcu_dereference_check(cgrp->dentry,
cgroup_lock_is_held());
dentry = cgrp->dentry;
if (!cgrp->parent)
continue;
if (--start < buf)
Expand Down Expand Up @@ -4124,7 +4125,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,

/* allocation complete, commit to creation */
dentry->d_fsdata = cgrp;
rcu_assign_pointer(cgrp->dentry, dentry);
cgrp->dentry = dentry;
list_add_tail(&cgrp->allcg_node, &root->allcg_list);
list_add_tail_rcu(&cgrp->sibling, &cgrp->parent->children);
root->number_of_cgroups++;
Expand Down

0 comments on commit 09f0aa1

Please sign in to comment.