提交 d1b00a47 编写于 作者: S Satoru Takeuchi 提交者: Chris Mason

btrfs: use IS_ALIGNED() for assertion in btrfs_lookup_csums_range() for simplicity

btrfs_lookup_csums_range() uses ALIGN() to check if "start"
and "end + 1" are aligned to "root->sectorsize". It's better to
replace these with IS_ALIGNED() for simplicity.
Signed-off-by: NSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: NChris Mason <clm@fb.com>
上级 1a76e4ba
......@@ -329,8 +329,8 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end,
u64 csum_end;
u16 csum_size = btrfs_super_csum_size(root->fs_info->super_copy);
ASSERT(start == ALIGN(start, root->sectorsize) &&
(end + 1) == ALIGN(end + 1, root->sectorsize));
ASSERT(IS_ALIGNED(start, root->sectorsize) &&
IS_ALIGNED(end + 1, root->sectorsize));
path = btrfs_alloc_path();
if (!path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册