btrfs: merge btrfs_folio_unlock_writer() into btrfs_folio_end_writer_lock()
authorQu Wenruo <wqu@suse.com>
Mon, 2 Sep 2024 04:27:08 +0000 (13:57 +0930)
committerDavid Sterba <dsterba@suse.com>
Tue, 10 Sep 2024 14:51:22 +0000 (16:51 +0200)
commit49a9907368a4633fe19c477159da7a3199c808ee
tree7db746e8123a08a6452bd94d7f9ae7e0000573ee
parent68f32b9c98522b9689e82627abeb5c10b3501915
btrfs: merge btrfs_folio_unlock_writer() into btrfs_folio_end_writer_lock()

The function btrfs_folio_unlock_writer() is already calling
btrfs_folio_end_writer_lock() to do the heavy lifting work, the only
missing 0 writer check.

Thus there is no need to keep two different functions, move the 0 writer
check into btrfs_folio_end_writer_lock(), and remove
btrfs_folio_unlock_writer().

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