]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
afs: Fix directory format encoding struct
authorDavid Howells <dhowells@redhat.com>
Mon, 16 Dec 2024 20:41:03 +0000 (20:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:49:49 +0000 (12:49 +0100)
commitf3cfafcdb5bbe658897ca203bab711073d8a8915
treea5bcc0910270167a1c826be6f1364802f4a23db1
parentef5f2706364d0ed08a686ba3a0e6b2bb3a39c4af
afs: Fix directory format encoding struct

[ Upstream commit 07a10767853adcbdbf436dc91393b729b52c4e81 ]

The AFS directory format structure, union afs_xdr_dir_block::meta, has too
many alloc counter slots declared and so pushes the hash table along and
over the data.  This doesn't cause a problem at the moment because I'm
currently ignoring the hash table and only using the correct number of
alloc_ctrs in the code anyway.  In future, however, I should start using
the hash table to try and speed up afs_lookup().

Fix this by using the correct constant to declare the counter array.

Fixes: 4ea219a839bf ("afs: Split the directory content defs into a header")
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20241216204124.3752367-14-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/xdr_fs.h