Merge tag 'fscrypt_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[sfrench/cifs-2.6.git] / fs / ext4 / namei.c
index 4d9b587507d9941759403b461bbcf9e0c1e36a04..b81f7d46f344d482d4a7ab15a5cc1ad3654b3259 100644 (file)
@@ -1819,11 +1819,10 @@ int ext4_find_dest_de(struct inode *dir, struct inode *inode,
        return 0;
 }
 
-int ext4_insert_dentry(struct inode *dir,
-                      struct inode *inode,
-                      struct ext4_dir_entry_2 *de,
-                      int buf_size,
-                      struct ext4_filename *fname)
+void ext4_insert_dentry(struct inode *inode,
+                       struct ext4_dir_entry_2 *de,
+                       int buf_size,
+                       struct ext4_filename *fname)
 {
 
        int nlen, rlen;
@@ -1842,7 +1841,6 @@ int ext4_insert_dentry(struct inode *dir,
        ext4_set_de_type(inode->i_sb, de, inode->i_mode);
        de->name_len = fname_len(fname);
        memcpy(de->name, fname_name(fname), fname_len(fname));
-       return 0;
 }
 
 /*
@@ -1878,11 +1876,8 @@ static int add_dirent_to_buf(handle_t *handle, struct ext4_filename *fname,
                return err;
        }
 
-       /* By now the buffer is marked for journaling. Due to crypto operations,
-        * the following function call may fail */
-       err = ext4_insert_dentry(dir, inode, de, blocksize, fname);
-       if (err < 0)
-               return err;
+       /* By now the buffer is marked for journaling */
+       ext4_insert_dentry(inode, de, blocksize, fname);
 
        /*
         * XXX shouldn't update any times until successful