Skip to content

Commit

Permalink
ubifs: switch to fscrypt_prepare_lookup()
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Eric Biggers authored and Richard Weinberger committed Jan 17, 2018
1 parent 0c1ad52 commit a0b3ccd
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions fs/ubifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,20 +220,9 @@ static struct dentry *ubifs_lookup(struct inode *dir, struct dentry *dentry,

dbg_gen("'%pd' in dir ino %lu", dentry, dir->i_ino);

if (ubifs_crypt_is_encrypted(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
* 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)
return ERR_PTR(err);
}
err = fscrypt_prepare_lookup(dir, dentry, flags);
if (err)
return ERR_PTR(err);

err = fscrypt_setup_filename(dir, &dentry->d_name, 1, &nm);
if (err)
Expand Down

0 comments on commit a0b3ccd

Please sign in to comment.