diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index 8e8d94319c3c..89826aea5e1e 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -309,6 +309,7 @@ static const struct address_space_operations exfat_aops = { .error_remove_folio = generic_error_remove_folio, .release_folio = iomap_release_folio, .invalidate_folio = iomap_invalidate_folio, + .swap_activate = exfat_iomap_swap_activate, }; static inline unsigned long exfat_hash(loff_t i_pos) diff --git a/fs/exfat/iomap.c b/fs/exfat/iomap.c index 3ac1eebe997f..1aac38e63fe6 100644 --- a/fs/exfat/iomap.c +++ b/fs/exfat/iomap.c @@ -263,3 +263,9 @@ const struct iomap_read_ops exfat_iomap_bio_read_ops = { .read_folio_range = iomap_bio_read_folio_range, .submit_read = exfat_iomap_bio_submit_read, }; + +int exfat_iomap_swap_activate(struct swap_info_struct *sis, + struct file *file, sector_t *span) +{ + return iomap_swapfile_activate(sis, file, span, &exfat_iomap_ops); +} diff --git a/fs/exfat/iomap.h b/fs/exfat/iomap.h index 830388f386f4..fd8a913f7794 100644 --- a/fs/exfat/iomap.h +++ b/fs/exfat/iomap.h @@ -12,4 +12,7 @@ extern const struct iomap_ops exfat_write_iomap_ops; extern const struct iomap_writeback_ops exfat_writeback_ops; extern const struct iomap_read_ops exfat_iomap_bio_read_ops; +int exfat_iomap_swap_activate(struct swap_info_struct *sis, + struct file *file, sector_t *span); + #endif /* _LINUX_EXFAT_IOMAP_H */