diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2015-04-14 20:51:49 -0400 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-05-27 19:39:58 +0200 |
| commit | 22d9ec5ecc4a4cb981f169622b3c4283abf27a88 (patch) | |
| tree | 5c014064044f62d9d26e002a8936aaf4736d434f /fs/ext4/inline.c | |
| parent | 185317fe189a98c38fc5a41a44b65dd4bd872703 (diff) | |
ext4 crypto: teach ext4_htree_store_dirent() to store decrypted filenames
For encrypted directories, we need to pass in a separate parameter for
the decrypted filename, since the directory entry contains the
encrypted filename.
Change-Id: I7290eb0979d9e9d9d65ee07bbf11223b3382394f
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@google.com>
Diffstat (limited to 'fs/ext4/inline.c')
| -rw-r--r-- | fs/ext4/inline.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 3ea62695a..956a32bad 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -1323,6 +1323,7 @@ int htree_inlinedir_to_tree(struct file *dir_file, struct ext4_iloc iloc; void *dir_buf = NULL; struct ext4_dir_entry_2 fake; + struct ext4_str tmp_str; ret = ext4_get_inode_loc(inode, &iloc); if (ret) @@ -1394,8 +1395,10 @@ int htree_inlinedir_to_tree(struct file *dir_file, continue; if (de->inode == 0) continue; - err = ext4_htree_store_dirent(dir_file, - hinfo->hash, hinfo->minor_hash, de); + tmp_str.name = de->name; + tmp_str.len = de->name_len; + err = ext4_htree_store_dirent(dir_file, hinfo->hash, + hinfo->minor_hash, de, &tmp_str); if (err) { count = err; goto out; |
