aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-04-12 00:56:26 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-04-12 00:56:26 -0400
commit2f61830ae33e2944ad66bb8bb40916f534b2e494 (patch)
tree7bd66dc3c940e88bea7b01db6b15199e25e5716e /fs/ext4/inline.c
parentd5d0e8c7203a41c01ba05f4e053e16a94ce3c2e1 (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. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r--fs/ext4/inline.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 8b64d715e476..661f0b8dcfe0 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1327,6 +1327,7 @@ int htree_inlinedir_to_tree(struct file *dir_file,
1327 struct ext4_iloc iloc; 1327 struct ext4_iloc iloc;
1328 void *dir_buf = NULL; 1328 void *dir_buf = NULL;
1329 struct ext4_dir_entry_2 fake; 1329 struct ext4_dir_entry_2 fake;
1330 struct ext4_str tmp_str;
1330 1331
1331 ret = ext4_get_inode_loc(inode, &iloc); 1332 ret = ext4_get_inode_loc(inode, &iloc);
1332 if (ret) 1333 if (ret)
@@ -1398,8 +1399,10 @@ int htree_inlinedir_to_tree(struct file *dir_file,
1398 continue; 1399 continue;
1399 if (de->inode == 0) 1400 if (de->inode == 0)
1400 continue; 1401 continue;
1401 err = ext4_htree_store_dirent(dir_file, 1402 tmp_str.name = de->name;
1402 hinfo->hash, hinfo->minor_hash, de); 1403 tmp_str.len = de->name_len;
1404 err = ext4_htree_store_dirent(dir_file, hinfo->hash,
1405 hinfo->minor_hash, de, &tmp_str);
1403 if (err) { 1406 if (err) {
1404 count = err; 1407 count = err;
1405 goto out; 1408 goto out;