diff options
author | Yushan Zhou <katrinzhou@tencent.com> | 2023-01-03 13:11:37 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-02-13 17:50:34 +0100 |
commit | ce394a7f39032bc2a85b070af608e3ae8b2cefda (patch) | |
tree | 9aad92997d8fb89919c8febb8cb482312648b207 /fs/btrfs/compression.c | |
parent | d31de3785047a24959eda835b0bafb1f8629f8a9 (diff) |
btrfs: use PAGE_{ALIGN, ALIGNED, ALIGN_DOWN} macro
The header file linux/mm.h provides PAGE_ALIGN, PAGE_ALIGNED,
PAGE_ALIGN_DOWN macros. Use these macros to make code more
concise.
Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
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 5122ca79f7ea..4a5aeb8dd479 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -1609,7 +1609,7 @@ static void heuristic_collect_sample(struct inode *inode, u64 start, u64 end, index_end = end >> PAGE_SHIFT; /* Don't miss unaligned end */ - if (!IS_ALIGNED(end, PAGE_SIZE)) + if (!PAGE_ALIGNED(end)) index_end++; curr_sample_pos = 0; |