Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[pandora-kernel.git] / kernel / cgroup.c
index 5ae71d6..a63507b 100644 (file)
@@ -3540,7 +3540,8 @@ static int cgroup_write_event_control(struct cgroup *cgrp, struct cftype *cft,
        }
 
        /* the process need read permission on control file */
-       ret = file_permission(cfile, MAY_READ);
+       /* AV: shouldn't we check that it's been opened for read instead? */
+       ret = inode_permission(cfile->f_path.dentry->d_inode, MAY_READ);
        if (ret < 0)
                goto fail;