]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: drop unnecessary offset_in_page in extent buffer helpers
authorDavid Sterba <dsterba@suse.com>
Wed, 29 Apr 2020 21:41:20 +0000 (23:41 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:34 +0000 (11:25 +0200)
commitbdc94a702055ec7be60baa8ba7be3432d277483c
tree44994c92b04864076da2a01decf618c1bcb7a809
parent48b6032e9fbee95a661cb5822a785e8c549df4f6
btrfs: drop unnecessary offset_in_page in extent buffer helpers

Helpers that iterate over extent buffer pages set up several variables,
one of them is finding out offset of the extent buffer start within a
page. Right now we have extent buffers aligned to page sizes so this is
effectively storing zero. This makes the code harder the follow and can
be simplified.

The same change is done in all the helpers:

* remove: size_t start_offset = offset_in_page(eb->start);
* simplify code using start_offset

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c