Skip to content

Commit 786e144

Browse files
author
Al Viro
committed
cgroup: we can use simple_lookup() now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 6e8cd2c commit 786e144

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

kernel/cgroup.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,6 @@ static struct cgroup *task_cgroup_from_root(struct task_struct *task,
802802
*/
803803

804804
static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
805-
static struct dentry *cgroup_lookup(struct inode *, struct dentry *, unsigned int);
806805
static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry);
807806
static int cgroup_populate_dir(struct cgroup *cgrp, bool base_files,
808807
unsigned long subsys_mask);
@@ -2642,7 +2641,7 @@ static const struct inode_operations cgroup_file_inode_operations = {
26422641
};
26432642

26442643
static const struct inode_operations cgroup_dir_inode_operations = {
2645-
.lookup = cgroup_lookup,
2644+
.lookup = simple_lookup,
26462645
.mkdir = cgroup_mkdir,
26472646
.rmdir = cgroup_rmdir,
26482647
.rename = cgroup_rename,
@@ -2652,14 +2651,6 @@ static const struct inode_operations cgroup_dir_inode_operations = {
26522651
.removexattr = cgroup_removexattr,
26532652
};
26542653

2655-
static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
2656-
{
2657-
if (dentry->d_name.len > NAME_MAX)
2658-
return ERR_PTR(-ENAMETOOLONG);
2659-
d_add(dentry, NULL);
2660-
return NULL;
2661-
}
2662-
26632654
/*
26642655
* Check if a file is a control file
26652656
*/

0 commit comments

Comments
 (0)