Skip to content

Commit 7bac54c

Browse files
committed
afs: Fix directory format encoding struct
JIRA: https://issues.redhat.com/browse/RHEL-78388 commit 07a1076 Author: David Howells <dhowells@redhat.com> Date: Mon Dec 16 20:41:03 2024 +0000 afs: Fix directory format encoding struct 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: 4ea219a ("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: Marc Dionne <mdionne@redhat.com>
1 parent b4a6e08 commit 7bac54c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/afs/xdr_fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ union afs_xdr_dir_block {
8888

8989
struct {
9090
struct afs_xdr_dir_hdr hdr;
91-
u8 alloc_ctrs[AFS_DIR_MAX_BLOCKS];
91+
u8 alloc_ctrs[AFS_DIR_BLOCKS_WITH_CTR];
9292
__be16 hashtable[AFS_DIR_HASHTBL_SIZE];
9393
} meta;
9494

0 commit comments

Comments
 (0)