diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2018-12-05 15:23:04 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 14:51:45 +0100 |
commit | fdb1e121803433775d1e6f79b21a13add8b22f57 (patch) | |
tree | 24a5c49ddc69436deea8d1892c36025de7f0c379 /fs/btrfs/compression.c | |
parent | btrfs: use offset_in_page instead of open-coding it (diff) | |
download | linux-fdb1e121803433775d1e6f79b21a13add8b22f57.tar.xz linux-fdb1e121803433775d1e6f79b21a13add8b22f57.zip |
btrfs: use PAGE_ALIGNED instead of open-coding it
When using a 'var & (PAGE_SIZE - 1)' construct one is checking for a page
alignment and thus should use the PAGE_ALIGNED() macro instead of
open-coding it.
Convert all open-coded occurrences of PAGE_ALIGNED().
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>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 2ab5591449f2..d5381f39a9e8 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -301,7 +301,7 @@ blk_status_t btrfs_submit_compressed_write(struct inode *inode, u64 start, blk_status_t ret; int skip_sum = BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM; - WARN_ON(start & ((u64)PAGE_SIZE - 1)); + WARN_ON(!PAGE_ALIGNED(start)); cb = kmalloc(compressed_bio_size(fs_info, compressed_len), GFP_NOFS); if (!cb) return BLK_STS_RESOURCE; |