diff options
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 9 |
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) { |