]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ubifs: use fscrypt_prepare_new_inode() and fscrypt_set_context()
authorEric Biggers <ebiggers@google.com>
Thu, 17 Sep 2020 04:11:28 +0000 (21:11 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 22 Sep 2020 13:48:36 +0000 (06:48 -0700)
commit4c030fa8870e9f0c53bcb91c607476ce7a4d6f2a
tree1b95290d378b9358cec7cf2ed70385b77c8b282a
parente075b6901047cd4c70b93cfcbe5f67dbc5741fb6
ubifs: use fscrypt_prepare_new_inode() and fscrypt_set_context()

Convert ubifs to use the new functions fscrypt_prepare_new_inode() and
fscrypt_set_context().

Unlike ext4 and f2fs, this doesn't appear to fix any deadlock bug.  But
it does shorten the code slightly and get all filesystems using the same
helper functions, so that fscrypt_inherit_context() can be removed.

It also fixes an incorrect error code where ubifs returned EPERM instead
of the expected ENOKEY.

Link: https://lore.kernel.org/r/20200917041136.178600-6-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/ubifs/dir.c