linux/fs
Lorenzo Stoakes d61f0d5968 mm: move vma_shrink(), vma_expand() to internal header
The vma_shrink() and vma_expand() functions are internal VMA manipulation
functions which we ought to abstract for use outside of memory management
code.

To achieve this, we replace shift_arg_pages() in fs/exec.c with an
invocation of a new relocate_vma_down() function implemented in mm/mmap.c,
which enables us to also move move_page_tables() and vma_iter_prev_range()
to internal.h.

The purpose of doing this is to isolate key VMA manipulation functions in
order that we can both abstract them and later render them easily
testable.

Link: https://lkml.kernel.org/r/3cfcd9ec433e032a85f636fdc0d7d98fafbd19c5.1722251717.git.lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: David Gow <davidgow@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Kees Cook <kees@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Rae Moar <rmoar@google.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Pengfei Xu <pengfei.xu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-01 20:25:54 -07:00
..
9p 9p: Fix DIO read through netfs 2024-08-13 13:53:09 +02:00
adfs fs/adfs: add MODULE_DESCRIPTION 2024-07-18 09:50:08 +02:00
affs
afs afs: Fix post-setattr file edit to do truncation correctly 2024-08-24 16:09:16 +02:00
autofs vfs-6.11.mount.api 2024-07-15 11:31:32 -07:00
bcachefs bcachefs: Mark more errors as autofix 2024-08-31 19:27:01 -04:00
befs
bfs
btrfs btrfs: fix uninitialized return value from btrfs_reclaim_sweep() 2024-08-27 16:42:09 +02:00
cachefiles cachefiles: Set the max subreq size for cache writes to MAX_RW_COUNT 2024-07-24 10:53:13 +02:00
ceph netfs, ceph: Partially revert "netfs: Replace PG_fscache by setting folio->private and marking dirty" 2024-08-21 22:32:58 +02:00
coda
configfs
cramfs vfs-6.11.module.description 2024-07-15 11:14:59 -07:00
crypto
debugfs vfs-6.11.mount.api 2024-07-15 11:31:32 -07:00
devpts
dlm
ecryptfs
efivarfs
efs vfs-6.11.module.description 2024-07-15 11:14:59 -07:00
erofs erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails 2024-08-21 08:12:05 +08:00
exfat Description for this pull request: 2024-07-17 12:53:47 -07:00
exportfs
ext2
ext4 Many cleanups and bug fixes in ext4, especially for the fast commit 2024-07-18 17:03:42 -07:00
f2fs f2fs update for 6.11-rc1 2024-07-23 15:21:19 -07:00
fat vfs-6.11.mount.api 2024-07-15 11:31:32 -07:00
freevxfs
fuse fuse: Initialize beyond-EOF page contents before setting uptodate 2024-08-18 08:45:39 -07:00
gfs2
hfs vfs-6.11.module.description 2024-07-15 11:14:59 -07:00
hfsplus vfs-6.11.misc 2024-07-15 10:52:51 -07:00
hostfs vfs-6.11-rc1.fixes.3 2024-07-27 15:11:59 -07:00
hpfs vfs-6.11.module.description 2024-07-15 11:14:59 -07:00
hugetlbfs - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
iomap vfs-6.11.iomap 2024-07-15 13:28:14 -07:00
isofs \n 2024-07-17 13:11:42 -07:00
jbd2
jffs2 Kbuild updates for v6.11 2024-07-23 14:32:21 -07:00
jfs Folio conversion from Matthew Wilcox and a few various fixes 2024-07-23 15:15:16 -07:00
kernfs
lockd
minix vfs-6.11.module.description 2024-07-15 11:14:59 -07:00
netfs netfs, cifs: Fix handling of short DIO read 2024-08-28 07:47:36 -05:00
nfs NFS: Avoid unnecessary rescanning of the per-server delegation list 2024-08-22 17:01:10 -04:00
nfs_common
nfsd nfsd-6.11 fixes: 2024-09-01 06:55:47 +12:00
nilfs2 nilfs2: handle inconsistent state in nilfs_btnode_create_block() 2024-07-26 14:33:10 -07:00
nls
notify
ntfs3 ntfs3 changes for 6.11-rc1 2024-07-22 10:50:18 -07:00
ocfs2 - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
omfs
openpromfs
orangefs
overlayfs Merge patch series "ovl: simplify ovl_parse_param_lowerdir()" 2024-08-24 16:00:46 +02:00
proc Random number generator updates for Linux 6.11-rc1. 2024-07-24 10:29:50 -07:00
pstore memblock: updates for 6.11-rc1 2024-07-18 14:48:11 -07:00
qnx4
qnx6
quota sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
ramfs
reiserfs
romfs romfs: fix romfs_read_folio() 2024-08-21 22:32:58 +02:00
smb cifs: Fix FALLOC_FL_ZERO_RANGE to preflush buffered part of target region 2024-08-28 16:52:17 -05:00
squashfs Squashfs: sanity check symbolic link size 2024-08-13 13:56:46 +02:00
sysfs
sysv
tests execve: Move KUnit tests to tests/ subdirectory 2024-07-22 18:25:47 -07:00
tracefs tracefs: Use generic inode RCU for synchronizing freeing 2024-08-07 20:27:49 -04:00
ubifs
udf
ufs - In the series "treewide: Refactor heap related implementation", 2024-07-21 17:56:22 -07:00
unicode
vboxsf vfs-6.11.mount.api 2024-07-15 11:31:32 -07:00
verity
xfs mm: kvmalloc: align kvrealloc() with krealloc() 2024-09-01 20:25:44 -07:00
zonefs
aio.c - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
anon_inodes.c
attr.c nfsd-6.11 fixes: 2024-08-29 06:20:44 +12:00
backing-file.c backing-file: convert to using fops->splice_write 2024-08-23 13:08:31 +02:00
bad_inode.c
binfmt_elf_fdpic.c binfmt_elf_fdpic: fix AUXV size calculation when ELF_HWCAP2 is defined 2024-08-26 13:00:38 -07:00
binfmt_elf.c execve fix for v6.11-rc1 2024-07-23 17:30:42 -07:00
binfmt_flat.c binfmt_flat: Fix corruption when not offsetting data start 2024-08-09 20:19:00 -07:00
binfmt_misc.c vfs-6.11.module.description 2024-07-15 11:14:59 -07:00
binfmt_script.c
buffer.c Many cleanups and bug fixes in ext4, especially for the fast commit 2024-07-18 17:03:42 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
d_path.c
dax.c
dcache.c dcache: keep dentry_hashtable or d_hash_shift even when not used 2024-08-30 12:25:50 +12:00
direct-io.c
drop_caches.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
eventfd.c
eventpoll.c
exec.c mm: move vma_shrink(), vma_expand() to internal header 2024-09-01 20:25:54 -07:00
fcntl.c
fhandle.c
file_table.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
file.c fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE 2024-08-05 19:23:11 -04:00
filesystems.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
fsopen.c
init.c
inode.c vfs: Don't evict inode under the inode lru traversing context 2024-08-13 13:52:16 +02:00
internal.h vfs-6.11.pidfs 2024-07-15 12:34:01 -07:00
ioctl.c
Kconfig mm/hugetlb: enforce that PMD PT sharing has split PMD PT locks 2024-09-01 20:25:51 -07:00
Kconfig.binfmt
kernel_read_file.c
libfs.c libfs: fix infinite directory reads for offset dir 2024-08-12 22:03:26 +02:00
locks.c filelock: fix name of file_lease slab cache 2024-08-12 22:03:25 +02:00
Makefile
mbcache.c
mnt_idmapping.c
mount.h vfs-6.11.mount 2024-07-15 11:54:04 -07:00
mpage.c
namei.c vfs: correct the comments of vfs_*() helpers 2024-07-24 10:53:12 +02:00
namespace.c fs: use all available ids 2024-07-24 10:53:13 +02:00
nsfs.c nsfs: use cleanup guard 2024-07-18 09:50:08 +02:00
open.c vfs-6.11.misc 2024-07-15 10:52:51 -07:00
pidfs.c pidfs: handle kernels without namespaces cleanly 2024-07-24 10:53:13 +02:00
pipe.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
remap_range.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c for-6.11/block-20240710 2024-07-15 14:20:22 -07:00
statfs.c
super.c fs/super.c: improve get_tree() error message 2024-08-22 02:07:23 -04:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c userfaultfd: move core VMA manipulation logic to mm/userfaultfd.c 2024-09-01 20:25:53 -07:00
utimes.c
xattr.c vfs: Fix potential circular locking through setxattr() and removexattr() 2024-07-24 10:53:14 +02:00