ext4 crypto: insert encrypted filenames into a leaf directory block
authorMichael Halcrow <mhalcrow@google.com>
Sun, 12 Apr 2015 04:56:28 +0000 (00:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 12 Apr 2015 04:56:28 +0000 (00:56 -0400)
Signed-off-by: Uday Savagaonkar <savagaon@google.com>
Signed-off-by: Ildar Muslukhov <ildarm@google.com>
Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/inline.c
fs/ext4/namei.c

index ba75838..5146e67 100644 (file)
@@ -2151,9 +2151,11 @@ extern int ext4_find_dest_de(struct inode *dir, struct inode *inode,
                             void *buf, int buf_size,
                             const char *name, int namelen,
                             struct ext4_dir_entry_2 **dest_de);
-void ext4_insert_dentry(struct inode *inode,
+int ext4_insert_dentry(struct inode *dir,
+                       struct inode *inode,
                        struct ext4_dir_entry_2 *de,
                        int buf_size,
+                      const struct qstr *iname,
                        const char *name, int namelen);
 static inline void ext4_update_dx_flag(struct inode *inode)
 {
index 661f0b8..feb2caf 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+
+#include <linux/fiemap.h>
+
 #include "ext4_jbd2.h"
 #include "ext4.h"
 #include "xattr.h"
 #include "truncate.h"
-#include <linux/fiemap.h>
 
 #define EXT4_XATTR_SYSTEM_DATA "data"
 #define EXT4_MIN_INLINE_DATA_SIZE      ((sizeof(__le32) * EXT4_N_BLOCKS))
@@ -1014,7 +1016,8 @@ static int ext4_add_dirent_to_inline(handle_t *handle,
        err = ext4_journal_get_write_access(handle, iloc->bh);
        if (err)
                return err;
-       ext4_insert_dentry(inode, de, inline_size, name, namelen);
+       ext4_insert_dentry(dir, inode, de, inline_size, &dentry->d_name,
+                          name, namelen);
 
        ext4_show_inline_dir(dir, iloc->bh, inline_start, inline_size);
 
diff --cc fs/ext4/namei.c
Simple merge