提交 55899d7b 编写于 作者: E Eric Biggers 提交者: Jaegeuk Kim

f2fs: switch to fscrypt_prepare_lookup()

Reviewed-by: NChao Yu <yuchao0@huawei.com>
Signed-off-by: NEric Biggers <ebiggers@google.com>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 2e45b07f
...@@ -357,20 +357,9 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, ...@@ -357,20 +357,9 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
trace_f2fs_lookup_start(dir, dentry, flags); trace_f2fs_lookup_start(dir, dentry, flags);
if (f2fs_encrypted_inode(dir)) { err = fscrypt_prepare_lookup(dir, dentry, flags);
err = fscrypt_get_encryption_info(dir); if (err)
/*
* 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; goto out;
}
if (dentry->d_name.len > F2FS_NAME_LEN) { if (dentry->d_name.len > F2FS_NAME_LEN) {
err = -ENAMETOOLONG; err = -ENAMETOOLONG;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册