btrfs: tree-log.c: Wrong printk information about namelen
authorSu Yue <suy.fnst@cn.fujitsu.com>
Wed, 24 May 2017 01:31:32 +0000 (09:31 +0800)
committerChris Mason <clm@fb.com>
Fri, 9 Jun 2017 19:48:07 +0000 (12:48 -0700)
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>
fs/btrfs/dir-item.c

index 60a750678a82b335ab7fd0e9432288d013c52e64..c24d615e3d7f60694d25d6a5c34f2dff45121ca7 100644 (file)
@@ -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;
        }