]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ceph: always set initial i_blkbits to CEPH_FSCRYPT_BLOCK_SHIFT
authorXiubo Li <xiubli@redhat.com>
Thu, 18 Jan 2024 06:24:41 +0000 (14:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:14:26 +0000 (19:14 +0100)
commit524b78875804bc905efdb84b181178c8be54f908
treea034a8faffaa359bcc18f438816a607142e3d426
parentbd9442e553ab8bf74b8be3b3c0a43bf4af4dc9b8
ceph: always set initial i_blkbits to CEPH_FSCRYPT_BLOCK_SHIFT

[ Upstream commit bbb20ea993f46743f7429092ddc52f1a5c5428ef ]

The fscrypt code will use i_blkbits to setup ci_data_unit_bits when
allocating the new inode, but ceph will initiate i_blkbits ater when
filling the inode, which is too late. Since ci_data_unit_bits will only
be used by the fscrypt framework so initiating i_blkbits with
CEPH_FSCRYPT_BLOCK_SHIFT is safe.

Link: https://tracker.ceph.com/issues/64035
Fixes: 5b1188847180 ("fscrypt: support crypto data unit size less than filesystem block size")
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/inode.c