From 496c02e0c0ee7e1957e9cf688894b758c81b7131 Mon Sep 17 00:00:00 2001 From: Satadru Pramanik Date: Tue, 26 Apr 2022 19:07:08 -0400 Subject: [PATCH] handle second instance of __set_page_dirty_nobuffers, fix style --- module/os/linux/zfs/zfs_vnops_os.c | 4 ++++ module/os/linux/zfs/zpl_file.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/module/os/linux/zfs/zfs_vnops_os.c b/module/os/linux/zfs/zfs_vnops_os.c index b65728f0d4c4..2ba90d889369 100644 --- a/module/os/linux/zfs/zfs_vnops_os.c +++ b/module/os/linux/zfs/zfs_vnops_os.c @@ -3556,7 +3556,11 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc) dmu_tx_wait(tx); dmu_tx_abort(tx); +#ifdef HAVE_VFS_FILEMAP_DIRTY_FOLIO + filemap_dirty_folio(page_mapping(pp), page_folio(pp)); +#else __set_page_dirty_nobuffers(pp); +#endif ClearPageError(pp); end_page_writeback(pp); zfs_rangelock_exit(lr); diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c index a481ddac3417..78cf7e7ef10e 100644 --- a/module/os/linux/zfs/zpl_file.c +++ b/module/os/linux/zfs/zpl_file.c @@ -33,7 +33,8 @@ #include #include #include -#if defined(HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS) || defined(HAVE_VFS_FILEMAP_DIRTY_FOLIO) +#if defined(HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS) || \ + defined(HAVE_VFS_FILEMAP_DIRTY_FOLIO) #include #endif #ifdef HAVE_VFS_FILEMAP_DIRTY_FOLIO