Skip to content

Commit acdc59f

Browse files
committed
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 8ae6247) Sponsored by: The FreeBSD Foundation
1 parent ee931cf commit acdc59f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sys/fs/ext2fs/inode.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ struct indir {
185185

186186
/* This overlays the fid structure (see mount.h). */
187187
struct ufid {
188-
uint16_t ufid_len; /* Length of structure. */
189-
uint16_t ufid_pad; /* Force 32-bit alignment. */
190-
ino_t ufid_ino; /* File number (ino). */
191-
uint32_t ufid_gen; /* Generation number. */
192-
} __packed;
188+
uint16_t ufid_len; /* Length of structure. */
189+
uint16_t ufid_pad; /* Force 32-bit alignment. */
190+
uint32_t ufid_gen; /* Generation number. */
191+
ino_t ufid_ino; /* File number (ino). */
192+
};
193193
#endif /* _KERNEL */
194194

195195
#endif /* !_FS_EXT2FS_INODE_H_ */

0 commit comments

Comments
 (0)