btrfs: make insert_inline_extent() accept one page directly
authorQu Wenruo <wqu@suse.com>
Mon, 29 Jan 2024 09:46:08 +0000 (20:16 +1030)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:02 +0000 (21:31 +0200)
commiteb1fa9ab470285d39bee268bc2a90d1786610711
tree6dedd2286796c8f3fc83a66707125b6f5773f356
parent98fe01af7ebe44bcc11afe4b4d681e27b959adb4
btrfs: make insert_inline_extent() accept one page directly

Since our inline extent cannot accept anything larger than a sector,
there is really no need to pass all the compressed pages to
insert_inline_extent().

And just in case, expand the ASSERT()s to make sure we only try inline
with compressed size no larger than sectorsize.

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