Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230961
b: refs/heads/master
c: c72a04e
h: refs/heads/master
i:
  230959: f2774f6
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Jan 14, 2011
1 parent d0b3009 commit 38faaec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 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: 323b7fe8f8f6d5ac6214382cf30e8b3a80b265c9
refs/heads/master: c72a04e34735ec3f19f4788b7f95017310b5e1eb
17 changes: 16 additions & 1 deletion trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ EXPORT_SYMBOL_GPL(cgroup_unlock);
*/

static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode);
static struct dentry *cgroup_lookup(struct inode *, struct dentry *, struct nameidata *);
static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry);
static int cgroup_populate_dir(struct cgroup *cgrp);
static const struct inode_operations cgroup_dir_inode_operations;
Expand Down Expand Up @@ -860,6 +861,11 @@ static void cgroup_diput(struct dentry *dentry, struct inode *inode)
iput(inode);
}

static int cgroup_delete(const struct dentry *d)
{
return 1;
}

static void remove_dir(struct dentry *d)
{
struct dentry *parent = dget(d->d_parent);
Expand Down Expand Up @@ -1451,6 +1457,7 @@ static int cgroup_get_rootdir(struct super_block *sb)
{
static const struct dentry_operations cgroup_dops = {
.d_iput = cgroup_diput,
.d_delete = cgroup_delete,
};

struct inode *inode =
Expand Down Expand Up @@ -2195,12 +2202,20 @@ static const struct file_operations cgroup_file_operations = {
};

static const struct inode_operations cgroup_dir_inode_operations = {
.lookup = simple_lookup,
.lookup = cgroup_lookup,
.mkdir = cgroup_mkdir,
.rmdir = cgroup_rmdir,
.rename = cgroup_rename,
};

static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
{
if (dentry->d_name.len > NAME_MAX)
return ERR_PTR(-ENAMETOOLONG);
d_add(dentry, NULL);
return NULL;
}

/*
* Check if a file is a control file
*/
Expand Down

0 comments on commit 38faaec

Please sign in to comment.