btrfs: extend btrfs_cleanup_ordered_extents for NULL locked_page
authorNaohiro Aota <naohiro.aota@wdc.com>
Tue, 21 Jun 2022 06:41:00 +0000 (15:41 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:45:38 +0000 (17:45 +0200)
commit99826e4cab979aed35993ac855b354f91f7474d9
tree10b6e2626d68ed133343bf9c1ecd1b11133ee25c
parent9ce7466f372d83054c7494f6b3e4b9abaf3f0355
btrfs: extend btrfs_cleanup_ordered_extents for NULL locked_page

btrfs_cleanup_ordered_extents() assumes locked_page to be non-NULL, so it
is not usable for submit_uncompressed_range() which can have NULL
locked_page.

Add support supports locked_page == NULL case. Also, it rewrites
redundant "page_offset(locked_page)".

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c