aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 4855892798fd..4fe52b3b6ef6 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2637,7 +2637,7 @@ static struct dentry *cgroup_lookup(struct inode *dir, struct dentry *dentry, un
2637 */ 2637 */
2638static inline struct cftype *__file_cft(struct file *file) 2638static inline struct cftype *__file_cft(struct file *file)
2639{ 2639{
2640 if (file->f_dentry->d_inode->i_fop != &cgroup_file_operations) 2640 if (file_inode(file)->i_fop != &cgroup_file_operations)
2641 return ERR_PTR(-EINVAL); 2641 return ERR_PTR(-EINVAL);
2642 return __d_cft(file->f_dentry); 2642 return __d_cft(file->f_dentry);
2643} 2643}
@@ -3852,7 +3852,7 @@ static int cgroup_write_event_control(struct cgroup *cgrp, struct cftype *cft,
3852 3852
3853 /* the process need read permission on control file */ 3853 /* the process need read permission on control file */
3854 /* AV: shouldn't we check that it's been opened for read instead? */ 3854 /* AV: shouldn't we check that it's been opened for read instead? */
3855 ret = inode_permission(cfile->f_path.dentry->d_inode, MAY_READ); 3855 ret = inode_permission(file_inode(cfile), MAY_READ);
3856 if (ret < 0) 3856 if (ret < 0)
3857 goto fail; 3857 goto fail;
3858 3858
@@ -5441,7 +5441,7 @@ struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id)
5441 struct inode *inode; 5441 struct inode *inode;
5442 struct cgroup_subsys_state *css; 5442 struct cgroup_subsys_state *css;
5443 5443
5444 inode = f->f_dentry->d_inode; 5444 inode = file_inode(f);
5445 /* check in cgroup filesystem dir */ 5445 /* check in cgroup filesystem dir */
5446 if (inode->i_op != &cgroup_dir_inode_operations) 5446 if (inode->i_op != &cgroup_dir_inode_operations)
5447 return ERR_PTR(-EBADF); 5447 return ERR_PTR(-EBADF);