On Wed, Jan 25, 2023 at 02:34:36PM +0100, Christoph Hellwig wrote: > @@ -363,8 +384,10 @@ void __swap_writepage(struct page *page, struct writeback_control *wbc) > */ > if (data_race(sis->flags & SWP_FS_OPS)) > swap_writepage_fs(page, wbc); > + else if (sis->flags & SWP_SYNCHRONOUS_IO) > + swap_writepage_bdev_sync(page, wbc, sis); For an additional cleanup, it looks okay to remove the SWP_SYNCHRONOUS_IO flag entirely and just check bdev_synchronous(sis->bdev)) directly instead.