linux/fs/ext4
Lorenzo Stoakes 8c90ae8fe5
fs/ext4: transition from deprecated .mmap hook to .mmap_prepare
Since commit c84bf6dd2b ("mm: introduce new .mmap_prepare() file
callback"), the f_op->mmap() hook has been deprecated in favour of
f_op->mmap_prepare().

This callback is invoked in the mmap() logic far earlier, so error handling
can be performed more safely without complicated and bug-prone state
unwinding required should an error arise.

This hook also avoids passing a pointer to a not-yet-correctly-established
VMA avoiding any issues with referencing this data structure.

It rather provides a pointer to the new struct vm_area_desc descriptor type
which contains all required state and allows easy setting of required
parameters without any consideration needing to be paid to locking or
reference counts.

Note that nested filesystems like overlayfs are compatible with an
.mmap_prepare() callback since commit bb666b7c27 ("mm: add mmap_prepare()
compatibility layer for nested file systems").

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Link: https://lore.kernel.org/5abfe526032a6698fd1bcd074a74165cda7ea57c.1750099179.git.lorenzo.stoakes@oracle.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-06-17 13:47:44 +02:00
..
.kunitconfig
Kconfig ext4: switch to using the crc32c library 2024-12-01 17:23:02 -08:00
Makefile
acl.c ext4: convert to ctime accessor functions 2023-07-24 10:29:54 +02:00
acl.h Revert "ext4: apply umask if ACL support is disabled" 2024-05-02 18:25:39 -04:00
balloc.c ext4: reorder capability check last 2025-03-18 00:15:25 -04:00
bitmap.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
block_validity.c ext4: make block validity check resistent to sb bh corruption 2025-04-12 22:01:37 -04:00
crypto.c ext4: Move CONFIG_UNICODE defguards into the code flow 2024-06-07 17:00:45 +02:00
dir.c ext4: fix OOB read when checking dotdot dir 2025-03-21 01:33:11 -04:00
ext4.h ext4: Simplify flags in ext4_map_query_blocks() 2025-05-20 14:21:00 -04:00
ext4_extents.h
ext4_jbd2.c ext4: enable large folio for regular file 2025-05-20 10:31:12 -04:00
ext4_jbd2.h ext4/jbd2: convert jbd2_journal_blocks_per_page() to support large folio 2025-05-20 10:31:12 -04:00
extents.c ext4: Add a WARN_ON_ONCE for querying LAST_IN_LEAF instead 2025-05-20 14:21:00 -04:00
extents_status.c ext4: clairfy the rules for modifying extents 2025-05-15 13:14:56 -04:00
extents_status.h ext4: don't pass full mapping flags to ext4_es_insert_extent() 2024-11-12 23:54:14 -05:00
fast_commit.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
fast_commit.h ext4 fast_commit: make use of name_snapshot primitives 2025-01-27 19:24:43 -05:00
file.c fs/ext4: transition from deprecated .mmap hook to .mmap_prepare 2025-06-17 13:47:44 +02:00
fsmap.c ext4: fix FS_IOC_GETFSMAP handling 2024-11-12 23:52:47 -05:00
fsmap.h
fsync.c ext4: add ext4_emergency_state() helper function 2025-03-13 10:16:34 -04:00
hash.c ext4: hash: simplify kzalloc(n * 1, ...) to kzalloc(n, ...) 2025-03-21 01:10:10 -04:00
ialloc.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
indirect.c ext4: fix race in buffer_head read fault injection 2024-11-12 23:54:14 -05:00
inline.c ext4: inline: fix len overflow in ext4_prepare_inline_data 2025-05-13 23:02:09 -04:00
inode-test.c ext4: add missing MODULE_DESCRIPTION() 2024-07-05 16:07:24 -04:00
inode.c New ext4 features and performance improvements: 2025-05-28 12:12:08 -07:00
ioctl.c ext4: remove sb argument from ext4_superblock_csum() 2025-05-20 10:31:12 -04:00
mballoc-test.c ext4: fix potential null dereference in ext4 kunit test 2025-03-13 10:01:14 -04:00
mballoc.c fs/ext4: use sleeping version of sb_find_get_block() 2025-04-22 18:16:08 +02:00
mballoc.h ext4: fix FS_IOC_GETFSMAP handling 2024-11-12 23:52:47 -05:00
migrate.c ext4: fix i_data_sem unlock order in ext4_ind_migrate() 2024-09-03 22:14:17 -04:00
mmp.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
move_extent.c ext4: make online defragmentation support large folios 2025-05-20 10:31:12 -04:00
namei.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
orphan.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
page-io.c Ext4 bug fixes and cleanups, including: 2025-03-27 13:27:08 -07:00
readpage.c ext4: make ext4_mpage_readpages() support large folios 2025-05-20 10:31:11 -04:00
resize.c ext4: remove sb argument from ext4_superblock_csum() 2025-05-20 10:31:12 -04:00
super.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
symlink.c ext4_get_link(): fix breakage in RCU mode 2024-02-25 02:10:32 -05:00
sysfs.c ext4: Make sb update interval tunable 2025-03-21 01:12:33 -04:00
truncate.h
verity.c fs: Convert aops->write_begin to take a folio 2024-08-07 11:33:21 +02:00
xattr.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
xattr.h ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all() 2025-03-18 00:15:19 -04:00
xattr_hurd.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01: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