summaryrefslogtreecommitdiff
path: root/fs/f2fs/namei.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2017-11-29 23:35:31 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2018-01-03 06:27:29 +0300
commit55899d7b4977759a751cf923d368e22b8c891544 (patch)
tree1b505479cd11505c4e7ccc412cdc018a606cd49d /fs/f2fs/namei.c
parent2e45b07fda2560eaafe80eab7a2ad9da763f22a1 (diff)
downloadlinux-55899d7b4977759a751cf923d368e22b8c891544.tar.xz
f2fs: switch to fscrypt_prepare_lookup()
Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/namei.c')
-rw-r--r--fs/f2fs/namei.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index e910d2ebe0c6..bbb3fc1e2bef 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -357,20 +357,9 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
trace_f2fs_lookup_start(dir, dentry, flags);
- if (f2fs_encrypted_inode(dir)) {
- err = fscrypt_get_encryption_info(dir);
-
- /*
- * DCACHE_ENCRYPTED_WITH_KEY is set if the dentry is
- * created while the directory was encrypted and we
- * don't have access to the key.
- */
- if (fscrypt_has_encryption_key(dir))
- fscrypt_set_encrypted_dentry(dentry);
- fscrypt_set_d_op(dentry);
- if (err && err != -ENOKEY)
- goto out;
- }
+ err = fscrypt_prepare_lookup(dir, dentry, flags);
+ if (err)
+ goto out;
if (dentry->d_name.len > F2FS_NAME_LEN) {
err = -ENAMETOOLONG;