aboutsummaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-05-12 10:04:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-05-12 10:04:14 -0700
commite238e49b18ee1bcbe4de952d06631dd3beada097 (patch)
tree90eac6691c4c0a6f9a85f30b2f84a271785d07c4 /mm/swapfile.c
parentMerge tag 'arm64_cbpf_mitigation_2025_05_08' of git://git.kernel.org/pub/scm/... (diff)
parentfs: Remove redundant errseq_set call in mark_buffer_write_io_error. (diff)
downloadlinux-e238e49b18ee1bcbe4de952d06631dd3beada097.tar.gz
linux-e238e49b18ee1bcbe4de952d06631dd3beada097.zip
Merge tag 'vfs-6.15-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner: - Ensure that simple_xattr_list() always includes security.* xattrs - Fix eventpoll busy loop optimization when combined with timeouts - Disable swapon() for devices with block sizes greater than page sizes - Don't call errseq_set() twice during mark_buffer_write_io_error(). Just use mapping_set_error() which takes care to not deference unconditionally * tag 'vfs-6.15-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: Remove redundant errseq_set call in mark_buffer_write_io_error. swapfile: disable swapon for bs > ps devices fs/eventpoll: fix endless busy loop after timeout has expired fs/xattr.c: fix simple_xattr_list to always include security.* xattrs
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index f214843612dc..412ccd6543b3 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -3332,6 +3332,15 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
}
/*
+ * The swap subsystem needs a major overhaul to support this.
+ * It doesn't work yet so just disable it for now.
+ */
+ if (mapping_min_folio_order(mapping) > 0) {
+ error = -EINVAL;
+ goto bad_swap_unlock_inode;
+ }
+
+ /*
* Read the swap header.
*/
if (!mapping->a_ops->read_folio) {