btrfs: use offset_in_page instead of open-coding it
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 5 Dec 2018 14:23:03 +0000 (15:23 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:45 +0000 (14:51 +0100)
commit7073017aeb98db311ca407f0f552f2bfc1af3015
tree55437b78aa398fc0b50224e6cd5af3e35dce0e5d
parentcb5583dd52fab469a001a007385066fcd60629c5
btrfs: use offset_in_page instead of open-coding it

Constructs like 'var & (PAGE_SIZE - 1)' or 'var & ~PAGE_MASK' can denote an
offset into a page.

So replace them by the offset_in_page() macro instead of open-coding it if
they're not used as an alignment check.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/check-integrity.c
fs/btrfs/compression.c
fs/btrfs/extent_io.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/send.c
fs/btrfs/volumes.c