diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-27 17:12:39 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-05-28 15:41:54 -0700 |
commit | 6e22c691ba0a63ba89f516f0bf1828cf6dce372d (patch) | |
tree | 21a94002a295de13ad6353688edbf94dfea6d304 /fs/f2fs/inline.c | |
parent | d8c6822a0556a88b13c8483599589752cf3e39f7 (diff) |
f2fs crypto: add filename encryption for f2fs_lookup
This patch implements filename encryption support for f2fs_lookup.
Note that, f2fs_find_entry should be outside of f2fs_(un)lock_op().
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index dd51d3f262b7..38e75fb1e488 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -284,23 +284,26 @@ process_inline: } struct f2fs_dir_entry *find_in_inline_dir(struct inode *dir, - struct qstr *name, struct page **res_page) + struct f2fs_filename *fname, struct page **res_page) { struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); struct f2fs_inline_dentry *inline_dentry; + struct qstr name = FSTR_TO_QSTR(&fname->disk_name); struct f2fs_dir_entry *de; struct f2fs_dentry_ptr d; struct page *ipage; + f2fs_hash_t namehash; ipage = get_node_page(sbi, dir->i_ino); if (IS_ERR(ipage)) return NULL; + namehash = f2fs_dentry_hash(&name); + inline_dentry = inline_data_addr(ipage); make_dentry_ptr(NULL, &d, (void *)inline_dentry, 2); - de = find_target_dentry(name, NULL, &d); - + de = find_target_dentry(fname, namehash, NULL, &d); unlock_page(ipage); if (de) *res_page = ipage; |