Re: [PATCH 5/7] mm: stop passing a writeback_control structure to swap_writeout

kernel test robot
2025-05-08T11:40:01Z

Hi Christoph,

kernel test robot noticed the following build errors:

[auto build test ERROR on next-20250507]
[cannot apply to akpm-mm/mm-everything konis-nilfs2/upstream linus/master v6.15-rc5 v6.15-rc4 v6.15-rc3 v6.15-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Christoph-Hellwig/mm-stop-passing-a-writeback_control-structure-to-shmem_writeout/20250508-144804
base: next-20250507
patch link: https://lore.kernel.org/r/20250508054938.15894-6-hch%40lst.de
patch subject: [PATCH 5/7] mm: stop passing a writeback_control structure to swap_writeout
config: openrisc-allnoconfig (https://download.01.org/0day-ci/archive/20250508/202505081941.kyY28sRZ-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250508/202505081941.kyY28sRZ-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505081941.kyY28sRZ-lkp@intel.com/

All errors (new ones prefixed by >>):

mm/vmscan.c: In function 'writeout':
>> mm/vmscan.c:670:44: error: passing argument 2 of 'swap_writeout' from incompatible pointer type [-Wincompatible-pointer-types]
670 | res = swap_writeout(folio, plug);
| ^~~~
| |
| struct swap_iocb **
In file included from mm/vmscan.c:69:
mm/swap.h:146:76: note: expected 'struct writeback_control *' but argument is of type 'struct swap_iocb **'
146 | static inline int swap_writeout(struct folio *f, struct writeback_control *wbc)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
--
mm/shmem.c: In function 'shmem_writeout':
>> mm/shmem.c:1644:45: error: passing argument 2 of 'swap_writeout' from incompatible pointer type [-Wincompatible-pointer-types]
1644 | return swap_writeout(folio, plug);
| ^~~~
| |
| struct swap_iocb **
In file included from mm/shmem.c:44:
mm/swap.h:146:76: note: expected 'struct writeback_control *' but argument is of type 'struct swap_iocb **'
146 | static inline int swap_writeout(struct folio *f, struct writeback_control *wbc)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~

vim +/swap_writeout +670 mm/vmscan.c

654
655 static pageout_t writeout(struct folio *folio, struct address_space *mapping,
656 struct swap_iocb **plug, struct list_head *folio_list)
657 {
658 int res;
659
660 folio_set_reclaim(folio);
661
662 /*
663 * The large shmem folio can be split if CONFIG_THP_SWAP is not enabled
664 * or we failed to allocate contiguous swap entries, in which case
665 * the split out folios get added back to folio_list.
666 */
667 if (shmem_mapping(mapping))
668 res = shmem_writeout(folio, plug, folio_list);
669 else
> 670 res = swap_writeout(folio, plug);
671
672 if (res < 0)
673 handle_write_error(mapping, folio, res);
674 if (res == AOP_WRITEPAGE_ACTIVATE) {
675 folio_clear_reclaim(folio);
676 return PAGE_ACTIVATE;
677 }
678
679 /* synchronous write? */
680 if (!folio_test_writeback(folio))
681 folio_clear_reclaim(folio);
682
683 trace_mm_vmscan_write_folio(folio);
684 node_stat_add_folio(folio, NR_VMSCAN_WRITE);
685 return PAGE_SUCCESS;
686 }
687

--
0-DAY CI Kernel Test Service