mirror-linux/fs/ext2
Jeff Layton 0b2600f81c
treewide: change inode->i_ino from unsigned long to u64
On 32-bit architectures, unsigned long is only 32 bits wide, which
causes 64-bit inode numbers to be silently truncated. Several
filesystems (NFS, XFS, BTRFS, etc.) can generate inode numbers that
exceed 32 bits, and this truncation can lead to inode number collisions
and other subtle bugs on 32-bit systems.

Change the type of inode->i_ino from unsigned long to u64 to ensure that
inode numbers are always represented as 64-bit values regardless of
architecture. Update all format specifiers treewide from %lu/%lx to
%llu/%llx to match the new type, along with corresponding local variable
types.

This is the bulk treewide conversion. Earlier patches in this series
handled trace events separately to allow trace field reordering for
better struct packing on 32-bit.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260304-iino-u64-v3-12-2257ad83d372@kernel.org
Acked-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-03-06 14:31:28 +01:00
..
Kconfig ext2: Remove LEGACY_DIRECT_IO dependency 2024-05-03 11:50:28 +02:00
Makefile ext2: Add direct-io trace points 2023-05-16 11:32:42 +02:00
acl.c ext2: convert to ctime accessor functions 2023-07-13 10:28:07 +02:00
acl.h fs: port ->set_acl() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
balloc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dir.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
ext2.h uapi: promote EFSCORRUPTED and EUCLEAN to errno.h 2026-01-13 09:58:01 +01:00
file.c ext2: add setlease file operation 2026-01-12 10:55:45 +01:00
ialloc.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
inode.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
ioctl.c tree-wide: s/struct fileattr/struct file_kattr/g 2025-07-04 16:14:39 +02:00
namei.c Change inode_operations.mkdir to return struct dentry * 2025-02-27 20:00:17 +01:00
super.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
symlink.c ext2: code cleanup by removing ifdef macro surrounding 2020-05-22 15:11:00 +02:00
trace.c ext2: Add direct-io trace points 2023-05-16 11:32:42 +02:00
trace.h ext2: widen trace event i_ino fields to u64 2026-03-06 14:31:27 +01:00
xattr.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
xattr.h ext2: move ext2_xattr_handlers and ext2_xattr_handler_map to .rodata 2023-10-09 16:24:18 +02:00
xattr_security.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_trusted.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_user.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00