git: 6b1a5d3535d9 - stable/14 - ext2fs: 'struct ufid': Re-order fields and unpack
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jan 2025 13:53:12 UTC
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6b1a5d3535d9211279667cec62c507caa001a410 commit 6b1a5d3535d9211279667cec62c507caa001a410 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2024-12-06 16:37:56 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-01-17 13:51:54 +0000 ext2fs: 'struct ufid': Re-order fields and unpack Re-ordering the fields suppresses the trailing padding which was causing the structure to overflow 'struct fid'. While here, re-indent in a more visually pleasing way. Reviewed by: rmacklem, emaste, markj Approved by: markj (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D47955 (cherry picked from commit 8ae6247aa966989412bd75fc7c26728690b9e944) Sponsored by: The FreeBSD Foundation --- sys/fs/ext2fs/inode.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 14d2d6454737..4c7ee0789529 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -189,11 +189,11 @@ struct indir { /* This overlays the fid structure (see mount.h). */ struct ufid { - uint16_t ufid_len; /* Length of structure. */ - uint16_t ufid_pad; /* Force 32-bit alignment. */ - ino_t ufid_ino; /* File number (ino). */ - uint32_t ufid_gen; /* Generation number. */ -} __packed; + uint16_t ufid_len; /* Length of structure. */ + uint16_t ufid_pad; /* Force 32-bit alignment. */ + uint32_t ufid_gen; /* Generation number. */ + ino_t ufid_ino; /* File number (ino). */ +}; #endif /* _KERNEL */ #endif /* !_FS_EXT2FS_INODE_H_ */