]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ecryptfs/inode.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[karo-tx-linux.git] / fs / ecryptfs / inode.c
index 32f90a3ae63eb85bc6d162aa16f28d48b3cdac7f..19a8ca4ab1ddc54bf4c8f389ef0dfcf8ce52a824 100644 (file)
@@ -143,24 +143,6 @@ static int ecryptfs_interpose(struct dentry *lower_dentry,
        return 0;
 }
 
-/**
- * ecryptfs_create_underlying_file
- * @lower_dir_inode: inode of the parent in the lower fs of the new file
- * @dentry: New file's dentry
- * @mode: The mode of the new file
- *
- * Creates the file in the lower file system.
- *
- * Returns zero on success; non-zero on error condition
- */
-static int
-ecryptfs_create_underlying_file(struct inode *lower_dir_inode,
-                               struct dentry *dentry, int mode)
-{
-       struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry);
-       return vfs_create(lower_dir_inode, lower_dentry, mode, NULL);
-}
-
 /**
  * ecryptfs_do_create
  * @directory_inode: inode of the new file's dentry's parent in ecryptfs
@@ -176,7 +158,7 @@ ecryptfs_create_underlying_file(struct inode *lower_dir_inode,
  */
 static struct inode *
 ecryptfs_do_create(struct inode *directory_inode,
-                  struct dentry *ecryptfs_dentry, int mode)
+                  struct dentry *ecryptfs_dentry, umode_t mode)
 {
        int rc;
        struct dentry *lower_dentry;
@@ -191,8 +173,7 @@ ecryptfs_do_create(struct inode *directory_inode,
                inode = ERR_CAST(lower_dir_dentry);
                goto out;
        }
-       rc = ecryptfs_create_underlying_file(lower_dir_dentry->d_inode,
-                                            ecryptfs_dentry, mode);
+       rc = vfs_create(lower_dir_dentry->d_inode, lower_dentry, mode, NULL);
        if (rc) {
                printk(KERN_ERR "%s: Failure to create dentry in lower fs; "
                       "rc = [%d]\n", __func__, rc);
@@ -267,7 +248,7 @@ out:
  */
 static int
 ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry,
-               int mode, struct nameidata *nd)
+               umode_t mode, struct nameidata *nd)
 {
        struct inode *ecryptfs_inode;
        int rc;
@@ -559,7 +540,7 @@ out_lock:
        return rc;
 }
 
-static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
+static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 {
        int rc;
        struct dentry *lower_dentry;
@@ -607,7 +588,7 @@ static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
 }
 
 static int
-ecryptfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
+ecryptfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
 {
        int rc;
        struct dentry *lower_dentry;