mirror-linux/fs/nilfs2
Jeff Layton 81359c146f
nilfs2: fix 64-bit division operations in nilfs_bmap_find_target_in_group()
With the change to make inode->i_ino a u64, the build started failing on
32-bit ARM with:

    ERROR: modpost: "__aeabi_uldivmod" [fs/nilfs2/nilfs2.ko] undefined!

Fix this by using udiv_u64() for the division.

For finding the index into the group, switch to using a bitwise &
operation since that's more efficient. With this change however,
NILFS_BMAP_GROUP_DIV must be a power of two, so add a compile-time
assertion for that.

Fixes: 998a59d371 ("treewide: fix missed i_ino format specifier conversions")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603100602.KPxiClIO-lkp@intel.com/
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Link: https://patch.msgid.link/20260316-iino-u64-v3-2-d1076b8f7a20@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-03-17 15:38:49 +01:00
..
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile
alloc.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
alloc.h nilfs2: add missing return value kernel-doc descriptions 2025-01-24 22:47:25 -08:00
bmap.c nilfs2: fix 64-bit division operations in nilfs_bmap_find_target_in_group() 2026-03-17 15:38:49 +01:00
bmap.h nilfs2: use the BITS_PER_LONG macro 2024-09-01 20:43:42 -07:00
btnode.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
btnode.h fs/nilfs2: Use the enum req_op and blk_opf_t types 2022-07-14 12:14:33 -06:00
btree.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
btree.h nilfs2: add missing description of nilfs_btree_path structure 2024-09-01 20:43:36 -07:00
cpfile.c nilfs2: use the new ->i_state accessors 2025-10-20 20:22:27 +02:00
cpfile.h nilfs2: remove nilfs_cpfile_{get,put}_checkpoint() 2024-02-22 15:38:53 -08:00
dat.c nilfs2: use the new ->i_state accessors 2025-10-20 20:22:27 +02:00
dat.h nilfs2: remove filenames from file comments 2021-11-09 10:02:52 -08:00
dir.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
direct.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
direct.h nilfs2: remove filenames from file comments 2021-11-09 10:02:52 -08:00
export.h
file.c nilfs2: add setlease file operation 2026-01-12 10:55:46 +01:00
gcinode.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
ifile.c nilfs2: use the new ->i_state accessors 2025-10-20 20:22:27 +02:00
ifile.h nilfs2: convert inode file to be folio-based 2024-11-05 17:12:38 -08:00
inode.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
ioctl.c nilfs2: replace vmalloc + copy_from_user with vmemdup_user 2025-11-12 10:00:17 -08:00
mdt.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
mdt.h nilfs2: fix lockdep warnings during disk space reclamation 2022-04-01 11:46:09 -07:00
namei.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
nilfs.h fs: inline current_umask() and move it to fs_struct.h 2025-11-05 22:51:23 +01:00
page.c mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
page.h nilfs2: convert nilfs_page_count_clean_buffers() to take a folio 2024-11-05 17:12:39 -08:00
recovery.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
segbuf.c nilfs2: correct return value kernel-doc descriptions for the rest 2025-01-24 22:47:25 -08:00
segbuf.h nilfs2: remove filenames from file comments 2021-11-09 10:02:52 -08:00
segment.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
segment.h nilfs2: remove wbc->for_reclaim handling 2025-05-21 10:48:23 -07:00
sufile.c nilfs2: Fix potential block overflow that cause system hang 2025-12-22 15:45:29 -08:00
sufile.h nilfs2: add missing return value kernel-doc descriptions 2025-01-24 22:47:25 -08:00
super.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sysfs.c nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/* 2025-09-13 13:05:38 -07:00
sysfs.h nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/* 2025-09-13 13:05:38 -07:00
the_nilfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
the_nilfs.h nilfs2: eliminate the shared counter and spinlock for i_generation 2024-09-01 20:43:43 -07:00