fscrypt: explicitly require that inode->i_blkbits be set
authorXiubo Li <xiubli@redhat.com>
Thu, 1 Feb 2024 00:35:25 +0000 (08:35 +0800)
committerEric Biggers <ebiggers@google.com>
Thu, 1 Feb 2024 02:44:59 +0000 (18:44 -0800)
commit5befc19caec93f0088595b4d28baf10658c27a0f
tree34eaab9f17f2d700f2920643414575ebd4c498b9
parent41bccc98fb7931d63d03f326a746ac4d429c1dd3
fscrypt: explicitly require that inode->i_blkbits be set

Document that fscrypt_prepare_new_inode() requires inode->i_blkbits to
be set, and make it WARN if it's not.  This would have made the CephFS
bug https://tracker.ceph.com/issues/64035 a bit easier to debug.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
Link: https://lore.kernel.org/r/20240201003525.1788594-1-xiubli@redhat.com
Signed-off-by: Eric Biggers <ebiggers@google.com>
fs/crypto/keysetup.c