aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c
diff options
context:
space:
mode:
authorLorenzo Stoakes <[email protected]>2025-06-16 19:33:29 +0000
committerChristian Brauner <[email protected]>2025-06-19 11:56:59 +0000
commit2e3b37a7e48f8a52fb708cdbeec9d8af0a5af0c1 (patch)
treeeec595c44d10093de12131c3cac5a0480382501a /drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c
parentfs: convert most other generic_file_*mmap() users to .mmap_prepare() (diff)
downloadkernel-2e3b37a7e48f8a52fb708cdbeec9d8af0a5af0c1.tar.gz
kernel-2e3b37a7e48f8a52fb708cdbeec9d8af0a5af0c1.zip
fs: replace mmap hook with .mmap_prepare for simple mappings
Since commit c84bf6dd2b83 ("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 bb666b7c2707 ("mm: add mmap_prepare() compatibility layer for nested file systems"). In this patch we apply this change to file systems with relatively simple mmap() hook logic - exfat, ceph, f2fs, bcachefs, zonefs, btrfs, ocfs2, orangefs, nilfs2, romfs, ramfs and aio. Signed-off-by: Lorenzo Stoakes <[email protected]> Link: https://lore.kernel.org/f528ac4f35b9378931bd800920fee53fc0c5c74d.1750099179.git.lorenzo.stoakes@oracle.com Acked-by: Damien Le Moal <[email protected]> Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Viacheslav Dubeyko <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_preempt_mgr.c')
0 files changed, 0 insertions, 0 deletions