Skip to content

Commit

Permalink
btrfs: tree-log.c: Wrong printk information about namelen
Browse files Browse the repository at this point in the history
In verify_dir_item, it wants to printk name_len of dir_item but
printk data_len acutally.

Fix it by calling btrfs_dir_name_len instead of btrfs_dir_data_len.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Su Yue authored and Chris Mason committed Jun 9, 2017
1 parent a9b3311 commit 286b92f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/dir-item.c
Original file line number Diff line number Diff line change
@@ -468,7 +468,7 @@ int verify_dir_item(struct btrfs_fs_info *fs_info,

if (btrfs_dir_name_len(leaf, dir_item) > namelen) {
btrfs_crit(fs_info, "invalid dir item name len: %u",
(unsigned)btrfs_dir_data_len(leaf, dir_item));
(unsigned)btrfs_dir_name_len(leaf, dir_item));
return 1;
}

0 comments on commit 286b92f

Please sign in to comment.