diff options
| author | David Howells <dhowells@redhat.com> | 2024-12-16 20:41:03 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-08 10:00:53 +0100 |
| commit | 94f2dc25b37f1bf5e3eb8e7a98fe34216a691fba (patch) | |
| tree | b50bc2469eae82f661df3d462f7c35e353d1c243 /fs | |
| parent | 9d80f5bdac143135b78ba0ee2a485277a9189d7d (diff) | |
| download | linux-94f2dc25b37f1bf5e3eb8e7a98fe34216a691fba.tar.gz linux-94f2dc25b37f1bf5e3eb8e7a98fe34216a691fba.tar.bz2 linux-94f2dc25b37f1bf5e3eb8e7a98fe34216a691fba.zip | |
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>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/afs/xdr_fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/xdr_fs.h b/fs/afs/xdr_fs.h index 8ca868164507..cc5f143d21a3 100644 --- a/fs/afs/xdr_fs.h +++ b/fs/afs/xdr_fs.h @@ -88,7 +88,7 @@ union afs_xdr_dir_block { struct { struct afs_xdr_dir_hdr hdr; - u8 alloc_ctrs[AFS_DIR_MAX_BLOCKS]; + u8 alloc_ctrs[AFS_DIR_BLOCKS_WITH_CTR]; __be16 hashtable[AFS_DIR_HASHTBL_SIZE]; } meta; |
