]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - security/selinux/hooks.c
Merge branch 'for-davem' into for-next
[karo-tx-linux.git] / security / selinux / hooks.c
index 7e392edaab97bee0f66825b195562c3aa879c05a..c318b304ee2f5be7001d6e26e30811bbbbd83859 100644 (file)
@@ -1622,7 +1622,7 @@ static inline int dentry_has_perm(const struct cred *cred,
    the path to help the auditing code to more easily generate the
    pathname if needed. */
 static inline int path_has_perm(const struct cred *cred,
-                               struct path *path,
+                               const struct path *path,
                                u32 av)
 {
        struct inode *inode = path->dentry->d_inode;
@@ -2953,15 +2953,9 @@ static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
        return dentry_has_perm(cred, dentry, av);
 }
 
-static int selinux_inode_getattr(struct vfsmount *mnt, struct dentry *dentry)
+static int selinux_inode_getattr(const struct path *path)
 {
-       const struct cred *cred = current_cred();
-       struct path path;
-
-       path.dentry = dentry;
-       path.mnt = mnt;
-
-       return path_has_perm(cred, &path, FILE__GETATTR);
+       return path_has_perm(current_cred(), path, FILE__GETATTR);
 }
 
 static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name)