提交 c64cda8a 编写于 作者: E Eric Biggers 提交者: Richard Weinberger

ubifs: remove unnecessary calls to set up directory key

In ubifs_unlink() and ubifs_rmdir(), remove the call to
fscrypt_get_encryption_info() that precedes fscrypt_setup_filename().
This call was unnecessary, because fscrypt_setup_filename() already
tries to set up the directory's encryption key.
Signed-off-by: NEric Biggers <ebiggers@google.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 37624b58
......@@ -792,12 +792,6 @@ static int ubifs_unlink(struct inode *dir, struct dentry *dentry)
dentry, inode->i_ino,
inode->i_nlink, dir->i_ino);
if (ubifs_crypt_is_encrypted(dir)) {
err = fscrypt_get_encryption_info(dir);
if (err && err != -ENOKEY)
return err;
}
err = fscrypt_setup_filename(dir, &dentry->d_name, 1, &nm);
if (err)
return err;
......@@ -902,12 +896,6 @@ static int ubifs_rmdir(struct inode *dir, struct dentry *dentry)
if (err)
return err;
if (ubifs_crypt_is_encrypted(dir)) {
err = fscrypt_get_encryption_info(dir);
if (err && err != -ENOKEY)
return err;
}
err = fscrypt_setup_filename(dir, &dentry->d_name, 1, &nm);
if (err)
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册