summaryrefslogtreecommitdiff
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-07-14 17:50:23 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-07-14 17:50:23 +0400
commit786e1448d9c5d2a469bcc9d2aecacd418ee1aca0 (patch)
tree9c78fd3c169ec9e98677afcccd48f283b6b73999 /kernel/cgroup.c
parent6e8cd2cb46e3c772871c86de2ffb718f911f9b59 (diff)
downloadlwn-786e1448d9c5d2a469bcc9d2aecacd418ee1aca0.tar.gz
lwn-786e1448d9c5d2a469bcc9d2aecacd418ee1aca0.zip
cgroup: we can use simple_lookup() now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e5583d10a325..0e0b20b8c5db 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -802,7 +802,6 @@ static struct cgroup *task_cgroup_from_root(struct task_struct *task,
*/
static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
-static struct dentry *cgroup_lookup(struct inode *, struct dentry *, unsigned int);
static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry);
static int cgroup_populate_dir(struct cgroup *cgrp, bool base_files,
unsigned long subsys_mask);
@@ -2642,7 +2641,7 @@ static const struct inode_operations cgroup_file_inode_operations = {
};
static const struct inode_operations cgroup_dir_inode_operations = {
- .lookup = cgroup_lookup,
+ .lookup = simple_lookup,
.mkdir = cgroup_mkdir,
.rmdir = cgroup_rmdir,
.rename = cgroup_rename,
@@ -2652,14 +2651,6 @@ static const struct inode_operations cgroup_dir_inode_operations = {
.removexattr = cgroup_removexattr,
};
-static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
-{
- 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
*/