+1
-10
kernel/cgroup.c
+1
-10
kernel/cgroup.c
···
802
802
*/
803
803
804
804
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);
806
805
static int cgroup_rmdir(struct inode *unused_dir, struct dentry *dentry);
807
806
static int cgroup_populate_dir(struct cgroup *cgrp, bool base_files,
808
807
unsigned long subsys_mask);
···
2641
2642
};
2642
2643
2643
2644
static const struct inode_operations cgroup_dir_inode_operations = {
2644
-
.lookup = cgroup_lookup,
2645
+
.lookup = simple_lookup,
2645
2646
.mkdir = cgroup_mkdir,
2646
2647
.rmdir = cgroup_rmdir,
2647
2648
.rename = cgroup_rename,
···
2650
2651
.listxattr = cgroup_listxattr,
2651
2652
.removexattr = cgroup_removexattr,
2652
2653
};
2653
-
2654
-
static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
2655
-
{
2656
-
if (dentry->d_name.len > NAME_MAX)
2657
-
return ERR_PTR(-ENAMETOOLONG);
2658
-
d_add(dentry, NULL);
2659
-
return NULL;
2660
-
}
2661
2654
2662
2655
/*
2663
2656
* Check if a file is a control file