summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dir-item.c
diff options
context:
space:
mode:
authorSu Yue <suy.fnst@cn.fujitsu.com>2017-05-24 03:31:32 +0200
committerChris Mason <clm@fb.com>2017-06-09 21:48:07 +0200
commit286b92f43c0d0ae2c29a61769b66219fe5ae6701 (patch)
tree4698eb35fac1b2cfecef57c289fafb2351c47c70 /fs/btrfs/dir-item.c
parentbtrfs: fix race with relocation recovery and fs_root setup (diff)
downloadlinux-286b92f43c0d0ae2c29a61769b66219fe5ae6701.tar.xz
linux-286b92f43c0d0ae2c29a61769b66219fe5ae6701.zip
btrfs: tree-log.c: Wrong printk information about namelen
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>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/dir-item.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c
index 60a750678a82..c24d615e3d7f 100644
--- a/fs/btrfs/dir-item.c
+++ b/fs/btrfs/dir-item.c
@@ -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;
}