• Qu Wenruo's avatar
    btrfs: remove btrfs_folio_end_all_writers() · ab6eac7c
    Qu Wenruo authored
    The function btrfs_folio_end_all_writers() is only utilized in
    extent_writepage() as a way to unlock all subpage range (for both
    successful submission and error handling).
    
    Meanwhile we have a similar function, btrfs_folio_end_writer_lock().
    
    The difference is, btrfs_folio_end_writer_lock() expects a range that is
    a subset of the already locked range.
    
    This limit on btrfs_folio_end_writer_lock() is a little overkilled,
    preventing it from being utilized for error paths.
    
    So here we enhance btrfs_folio_end_writer_lock() to accept a superset of
    the locked range, and only end the locked subset.
    This means we can replace btrfs_folio_end_all_writers() with
    btrfs_folio_end_writer_lock() instead.
    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>
    ab6eac7c
subpage.c 29.2 KB