]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - security/tomoyo/tomoyo.c
Merge tag 'to-linus' of git://github.com/rustyrussell/linux
[karo-tx-linux.git] / security / tomoyo / tomoyo.c
index 4b327b6917451bbe8f4ad2fc2cccad113a9cbf46..620d37c159a3948fd85faa70db3acc326a7ba281 100644 (file)
@@ -186,7 +186,7 @@ static int tomoyo_path_unlink(struct path *parent, struct dentry *dentry)
  * Returns 0 on success, negative value otherwise.
  */
 static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry,
-                            int mode)
+                            umode_t mode)
 {
        struct path path = { parent->mnt, dentry };
        return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path,
@@ -234,7 +234,7 @@ static int tomoyo_path_symlink(struct path *parent, struct dentry *dentry,
  * Returns 0 on success, negative value otherwise.
  */
 static int tomoyo_path_mknod(struct path *parent, struct dentry *dentry,
-                            int mode, unsigned int dev)
+                            umode_t mode, unsigned int dev)
 {
        struct path path = { parent->mnt, dentry };
        int type = TOMOYO_TYPE_CREATE;
@@ -353,17 +353,14 @@ static int tomoyo_file_ioctl(struct file *file, unsigned int cmd,
 /**
  * tomoyo_path_chmod - Target for security_path_chmod().
  *
- * @dentry: Pointer to "struct dentry".
- * @mnt:    Pointer to "struct vfsmount".
- * @mode:   DAC permission mode.
+ * @path: Pointer to "struct path".
+ * @mode: DAC permission mode.
  *
  * Returns 0 on success, negative value otherwise.
  */
-static int tomoyo_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
-                            mode_t mode)
+static int tomoyo_path_chmod(struct path *path, umode_t mode)
 {
-       struct path path = { mnt, dentry };
-       return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, &path,
+       return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path,
                                       mode & S_IALLUGO);
 }