mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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>
This commit is contained in:
committed by
Christian Brauner
parent
d84c70c6ea
commit
0b2600f81c
@@ -1676,9 +1676,9 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m)
|
||||
attachment = READ_ONCE(bo->tbo.base.import_attach);
|
||||
|
||||
if (attachment)
|
||||
seq_printf(m, " imported from ino:%lu", file_inode(dma_buf->file)->i_ino);
|
||||
seq_printf(m, " imported from ino:%llu", file_inode(dma_buf->file)->i_ino);
|
||||
else if (dma_buf)
|
||||
seq_printf(m, " exported as ino:%lu", file_inode(dma_buf->file)->i_ino);
|
||||
seq_printf(m, " exported as ino:%llu", file_inode(dma_buf->file)->i_ino);
|
||||
|
||||
amdgpu_bo_print_flag(m, bo, CPU_ACCESS_REQUIRED);
|
||||
amdgpu_bo_print_flag(m, bo, NO_CPU_ACCESS);
|
||||
|
||||
Reference in New Issue
Block a user