Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16c5bfa1 authored by Eric Biggers's avatar Eric Biggers Committed by Jaegeuk Kim
Browse files

f2fs: switch to fscrypt_prepare_lookup()

parent 5998a21b
Loading
Loading
Loading
Loading
+3 −14
Original line number Diff line number Diff line
@@ -349,20 +349,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)
	err = fscrypt_prepare_lookup(dir, dentry, flags);
	if (err)
		goto out;
	}

	if (dentry->d_name.len > F2FS_NAME_LEN) {
		err = -ENAMETOOLONG;