Hey Linus, /* Summary */ Features: - Add CONFIG_DEBUG_VFS infrastucture: - Catch invalid modes in open. - Use the new debug macros in inode_set_cached_link(). - Use debug-only asserts around fd allocation and install. - Place f_ref to 3rd cache line in struct file to resolve false sharing. Cleanups: - Start using anon_inode_getfile_fmode() helper in various places. - Don't take f_lock during SEEK_CUR if exclusion is guaranteed by f_pos_lock. - Add unlikely() to kcmp(). - Remove legacy ->remount_fs method from ecryptfs after port to the new mount api. - Remove invalidate_inodes() in favour of evict_inodes(). - Simplify ep_busy_loopER by removing unused argument. - Avoid mmap sem relocks when coredumping with many missing pages. - Inline getname(). - Inline new_inode_pseudo() and de-staticize alloc_inode(). - Dodge an atomic in putname if ref == 1. - Consistently deref the files table with rcu_dereference_raw(). - Dedup handling of struct filename init and refcounts bumps. - Use wq_has_sleeper() in end_dir_add(). - Drop the lock trip around I_NEW wake up in evict(). - Load the ->i_sb pointer once in inode_sb_list_{add,del}. - Predict not reaching the limit in alloc_empty_file(). - Tidy up do_sys_openat2() with likely/unlikely. - Call inode_sb_list_add() outside of inode hash lock. - Sort out fd allocation vs dup2 race commentary. - Turn page_offset() into a wrapper around folio_pos(). - Remove locking in exportfs around ->get_parent() call. - try_lookup_one_len() does not need any locks in autofs. - Fix return type of several functions from long to int in open. - Fix return type of several functions from long to int in ioctls. Fixes: - Fix watch queue accounting mismatch. /* Testing */ gcc version 14.2.0 (Debian 14.2.0-6) Debian clang version 16.0.6 (27+b1) No build failures or warnings were observed. /* Conflicts */ Merge conflicts with mainline ============================= This contains a minor merge conflict for include/linux/fs.h. Merge conflicts with other trees ================================ No known conflicts. The following changes since commit 2014c95afecee3e76ca4a56956a936e23283f05b: Linux 6.14-rc1 (2025-02-02 15:39:26 -0800) are available in the Git repository at: git@xxxxxxxxxxxxxxxxxxx:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.15-rc1.misc for you to fetch changes up to 4dec4f91359c456a5eea26817ea151b42953432e: fs: sort out fd allocation vs dup2 race commentary, take 2 (2025-03-20 15:17:56 +0100) Please consider pulling these changes from the signed vfs-6.15-rc1.misc tag. Thanks! Christian ---------------------------------------------------------------- vfs-6.15-rc1.misc ---------------------------------------------------------------- Al Viro (1): make use of anon_inode_getfile_fmode() Christian Brauner (3): Merge patch series "CONFIG_DEBUG_VFS at last" Merge patch series "Fix the return type of several functions from long to int" fs: don't needlessly acquire f_lock Colin Ian King (1): kcmp: improve performance adding an unlikely hint to task comparisons Eric Sandeen (2): watch_queue: fix pipe accounting mismatch ecryptfs: remove NULL remount_fs from super_operations Jan Kara (1): vfs: Remove invalidate_inodes() Lin Feng (1): epoll: simplify ep_busy_loop by removing always 0 argument Mateusz Guzik (17): vfs: add initial support for CONFIG_DEBUG_VFS vfs: catch invalid modes in may_open() vfs: use the new debug macros in inode_set_cached_link() fs: avoid mmap sem relocks when coredumping with many missing pages vfs: inline getname() vfs: inline new_inode_pseudo() and de-staticize alloc_inode() fs: dodge an atomic in putname if ref == 1 fs: use debug-only asserts around fd allocation and install fs: consistently deref the files table with rcu_dereference_raw() fs: dedup handling of struct filename init and refcounts bumps fs: use wq_has_sleeper() in end_dir_add() fs: drop the lock trip around I_NEW wake up in evict() fs: load the ->i_sb pointer once in inode_sb_list_{add,del} fs: predict not reaching the limit in alloc_empty_file() fs: tidy up do_sys_openat2() with likely/unlikely fs: call inode_sb_list_add() outside of inode hash lock fs: sort out fd allocation vs dup2 race commentary, take 2 Matthew Wilcox (Oracle) (1): fs: Turn page_offset() into a wrapper around folio_pos() NeilBrown (2): exportfs: remove locking around ->get_parent() call. VFS/autofs: try_lookup_one_len() does not need any locks Pan Deng (1): fs: place f_ref to 3rd cache line in struct file to resolve false sharing Yuichiro Tsuji (2): open: Fix return type of several functions from long to int ioctl: Fix return type of several functions from long to int Documentation/filesystems/porting.rst | 5 ++ arch/arm64/kernel/elfcore.c | 3 +- arch/powerpc/platforms/pseries/papr-vpd.c | 7 +- drivers/vfio/group.c | 16 +--- fs/autofs/dev-ioctl.c | 3 - fs/cachefiles/ondemand.c | 7 +- fs/coredump.c | 38 +++++++-- fs/dcache.c | 3 +- fs/ecryptfs/super.c | 1 - fs/eventfd.c | 5 +- fs/eventpoll.c | 8 +- fs/exportfs/expfs.c | 2 - fs/file.c | 81 +++++++++++++------ fs/file_table.c | 3 +- fs/inode.c | 127 +++++++++++------------------- fs/internal.h | 6 +- fs/ioctl.c | 10 +-- fs/namei.c | 42 +++++----- fs/open.c | 29 +++---- fs/read_write.c | 13 ++- fs/signalfd.c | 7 +- fs/smb/client/file.c | 2 +- fs/super.c | 2 +- fs/timerfd.c | 6 +- include/linux/fs.h | 36 ++++++--- include/linux/mm.h | 2 +- include/linux/pagemap.h | 20 ++--- include/linux/syscalls.h | 4 +- include/linux/vfsdebug.h | 45 +++++++++++ kernel/auditsc.c | 12 ++- kernel/kcmp.c | 2 +- kernel/watch_queue.c | 9 +++ lib/Kconfig.debug | 9 +++ mm/gup.c | 6 +- security/landlock/fs.c | 2 +- virt/kvm/kvm_main.c | 11 +-- 36 files changed, 339 insertions(+), 245 deletions(-) create mode 100644 include/linux/vfsdebug.h