Let's check mmap writes onto the large folio, since we don't support writing
large folios.
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
int err = 0;
vm_fault_t ret;
- if (unlikely(IS_IMMUTABLE(inode)))
+ /*
+ * We only support large folio on the read case.
+ * Don't make any dirty pages.
+ */
+ if (unlikely(IS_IMMUTABLE(inode)) ||
+ mapping_large_folio_support(inode->i_mapping)) {
+ f2fs_err(sbi, "Not expected: immutable: %d large_folio: %d",
+ IS_IMMUTABLE(inode),
+ mapping_large_folio_support(inode->i_mapping));
return VM_FAULT_SIGBUS;
+ }
if (is_inode_flag_set(inode, FI_COMPRESS_RELEASED)) {
err = -EIO;