ext4: use fscrypt_prepare_new_inode() and fscrypt_set_context()
authorEric Biggers <ebiggers@google.com>
Thu, 17 Sep 2020 04:11:26 +0000 (21:11 -0700)
committerEric Biggers <ebiggers@google.com>
Tue, 22 Sep 2020 13:48:33 +0000 (06:48 -0700)
commit02ce5316afc86274c55c7b07a81ad6411d28f077
tree42ed8986b21f77fbbf2f0b8050a76e7189e96f85
parent177cc0e71008b7a0737bf55c88538d0b9e6e9191
ext4: use fscrypt_prepare_new_inode() and fscrypt_set_context()

Convert ext4 to use the new functions fscrypt_prepare_new_inode() and
fscrypt_set_context().  This avoids calling
fscrypt_get_encryption_info() from within a transaction, which can
deadlock because fscrypt_get_encryption_info() isn't GFP_NOFS-safe.

For more details about this problem, see the earlier patch
"fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()".

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