]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: make btrfs_page_mkwrite() to be subpage compatible
authorQu Wenruo <wqu@suse.com>
Mon, 31 May 2021 08:50:52 +0000 (16:50 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:10 +0000 (15:19 +0200)
Only set_page_dirty() and SetPageUptodate() is not subpage compatible.
Convert them to subpage helpers, so that __extent_writepage_io() can
submit page content correctly.

Tested-by: Ritesh Harjani <riteshh@linux.ibm.com> # [ppc64]
Tested-by: Anand Jain <anand.jain@oracle.com> # [aarch64]
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c

index 88838ef22413a6d5ce5a337e5bac8e9e4c7e93d5..0d67a14114e7d46ca68cd99cba2a0338ecfdf304 100644 (file)
@@ -8651,8 +8651,8 @@ again:
                flush_dcache_page(page);
        }
        ClearPageChecked(page);
-       set_page_dirty(page);
-       SetPageUptodate(page);
+       btrfs_page_set_dirty(fs_info, page, page_start, end + 1 - page_start);
+       btrfs_page_set_uptodate(fs_info, page, page_start, end + 1 - page_start);
 
        btrfs_set_inode_last_sub_trans(BTRFS_I(inode));