• Qu Wenruo's avatar
    btrfs: refactor page status update into process_one_page() · ed8f13bf
    Qu Wenruo authored
    In __process_pages_contig() we update page status according to page_ops.
    
    That update process is a bunch of 'if' branches, which lie inside
    two loops, this makes it pretty hard to expand for later subpage
    operations.
    
    So this patch will extract these operations into its own function,
    process_one_pages().
    
    Also since we're refactoring __process_pages_contig(), also move the new
    helper and __process_pages_contig() before the first caller of them, to
    remove the forward declaration.
    
    Tested-by: Ritesh Harjani <riteshh@linux.ibm.com> # [ppc64]
    Tested-by: Anand Jain <anand.jain@oracle.com> # [aarch64]
    Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    ed8f13bf
extent_io.c 187 KB