]> git.baikalelectronics.ru Git - 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)
commit209364037a2d74d5f584af6e86075c1e41542cb6
tree1b95290d378b9358cec7cf2ed70385b77c8b282a
parent0324036b3f0913c405b5474fe5519d0c568edbe2
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