btrfs: cleanup calculation of lockend in lock_and_cleanup_extent_if_need()
authorQu Wenruo <wqu@suse.com>
Thu, 13 Aug 2020 06:33:52 +0000 (14:33 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:06:54 +0000 (12:06 +0200)
commite21139c621ada48f2bc382865ea34dd49d45c2a8
treef29e1b25a89d3fc2511b16f20e8a0861b3770520
parentc4923027bd58cdccbe54e13298a4d914668a56da
btrfs: cleanup calculation of lockend in lock_and_cleanup_extent_if_need()

We're just doing rounding up to sectorsize to calculate the lockend.
There is no need to do the unnecessary length calculation, just direct
round_up() is enough.

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/file.c