Skip to content

Commit

Permalink
f2fs: switch to fscrypt_prepare_lookup()
Browse files Browse the repository at this point in the history
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
ebiggers authored and Jaegeuk Kim committed Jan 3, 2018
1 parent 2e45b07 commit 55899d7
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions fs/f2fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 55899d7

Please sign in to comment.