Skip to content

Commit c87f318

Browse files
Anastasia Belovakdave
authored andcommitted
btrfs: print-tree: parent bytenr must be aligned to sector size
Check nodesize to sectorsize in alignment check in print_extent_item. The comment states that and this is correct, similar check is done elsewhere in the functions. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: ea57788 ("btrfs: require only sector size alignment for parent eb bytenr") CC: [email protected] # 4.14+ Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Anastasia Belova <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent d246331 commit c87f318

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/btrfs/print-tree.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ static void print_extent_item(struct extent_buffer *eb, int slot, int type)
151151
pr_cont("shared data backref parent %llu count %u\n",
152152
offset, btrfs_shared_data_ref_count(eb, sref));
153153
/*
154-
* offset is supposed to be a tree block which
155-
* must be aligned to nodesize.
154+
* Offset is supposed to be a tree block which must be
155+
* aligned to sectorsize.
156156
*/
157-
if (!IS_ALIGNED(offset, eb->fs_info->nodesize))
157+
if (!IS_ALIGNED(offset, eb->fs_info->sectorsize))
158158
pr_info(
159159
"\t\t\t(parent %llu not aligned to sectorsize %u)\n",
160160
offset, eb->fs_info->sectorsize);

0 commit comments

Comments
 (0)