Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119201
b: refs/heads/master
c: 33d283b
h: refs/heads/master
i:
  119199: 5e0b131
v: v3
  • Loading branch information
Li Zefan authored and Linus Torvalds committed Nov 20, 2008
1 parent 6a20592 commit 7aae01f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: ea7e743e49b94749fc739baaf160809ed279aeda
refs/heads/master: 33d283bef23132c48195eafc21449f8ba88fce6b
7 changes: 5 additions & 2 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2039,10 +2039,13 @@ int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry)
struct cgroup *cgrp;
struct cgroup_iter it;
struct task_struct *tsk;

/*
* Validate dentry by checking the superblock operations
* Validate dentry by checking the superblock operations,
* and make sure it's a directory.
*/
if (dentry->d_sb->s_op != &cgroup_ops)
if (dentry->d_sb->s_op != &cgroup_ops ||
!S_ISDIR(dentry->d_inode->i_mode))
goto err;

ret = 0;
Expand Down

0 comments on commit 7aae01f

Please sign in to comment.