btrfs: subpage: make btrfs_alloc_subpage() return btrfs_subpage directly
authorQu Wenruo <wqu@suse.com>
Tue, 17 Aug 2021 09:38:50 +0000 (17:38 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Oct 2021 19:17:16 +0000 (21:17 +0200)
commit651fb419273300ebad459630becd839d79439bbc
tree818992dcadc16205f9c203565609ecaead1917d7
parentfdf250db89b65167891a73327f8cd4f58a323612
btrfs: subpage: make btrfs_alloc_subpage() return btrfs_subpage directly

The existing calling convention of btrfs_alloc_subpage() is pretty
awful.  Change it to a more common pattern by returning struct
btrfs_subpage directly and let the caller to determine if the call
succeeded.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
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/extent_io.c
fs/btrfs/subpage.c
fs/btrfs/subpage.h