diff options
Diffstat (limited to 'fs/btrfs/dir-item.c')
-rw-r--r-- | fs/btrfs/dir-item.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/dir-item.c b/fs/btrfs/dir-item.c index c031ea3fd70f..a0691df5dcea 100644 --- a/fs/btrfs/dir-item.c +++ b/fs/btrfs/dir-item.c | |||
@@ -261,7 +261,7 @@ int btrfs_check_dir_item_collision(struct btrfs_root *root, u64 dir, | |||
261 | * see if there is room in the item to insert this | 261 | * see if there is room in the item to insert this |
262 | * name | 262 | * name |
263 | */ | 263 | */ |
264 | data_size = sizeof(*di) + name_len + sizeof(struct btrfs_item); | 264 | data_size = sizeof(*di) + name_len; |
265 | leaf = path->nodes[0]; | 265 | leaf = path->nodes[0]; |
266 | slot = path->slots[0]; | 266 | slot = path->slots[0]; |
267 | if (data_size + btrfs_item_size_nr(leaf, slot) + | 267 | if (data_size + btrfs_item_size_nr(leaf, slot) + |
@@ -459,7 +459,7 @@ int verify_dir_item(struct btrfs_root *root, | |||
459 | u8 type = btrfs_dir_type(leaf, dir_item); | 459 | u8 type = btrfs_dir_type(leaf, dir_item); |
460 | 460 | ||
461 | if (type >= BTRFS_FT_MAX) { | 461 | if (type >= BTRFS_FT_MAX) { |
462 | printk(KERN_CRIT "btrfs: invalid dir item type: %d\n", | 462 | btrfs_crit(root->fs_info, "invalid dir item type: %d", |
463 | (int)type); | 463 | (int)type); |
464 | return 1; | 464 | return 1; |
465 | } | 465 | } |
@@ -468,7 +468,7 @@ int verify_dir_item(struct btrfs_root *root, | |||
468 | namelen = XATTR_NAME_MAX; | 468 | namelen = XATTR_NAME_MAX; |
469 | 469 | ||
470 | if (btrfs_dir_name_len(leaf, dir_item) > namelen) { | 470 | if (btrfs_dir_name_len(leaf, dir_item) > namelen) { |
471 | printk(KERN_CRIT "btrfs: invalid dir item name len: %u\n", | 471 | btrfs_crit(root->fs_info, "invalid dir item name len: %u", |
472 | (unsigned)btrfs_dir_data_len(leaf, dir_item)); | 472 | (unsigned)btrfs_dir_data_len(leaf, dir_item)); |
473 | return 1; | 473 | return 1; |
474 | } | 474 | } |
@@ -476,7 +476,7 @@ int verify_dir_item(struct btrfs_root *root, | |||
476 | /* BTRFS_MAX_XATTR_SIZE is the same for all dir items */ | 476 | /* BTRFS_MAX_XATTR_SIZE is the same for all dir items */ |
477 | if ((btrfs_dir_data_len(leaf, dir_item) + | 477 | if ((btrfs_dir_data_len(leaf, dir_item) + |
478 | btrfs_dir_name_len(leaf, dir_item)) > BTRFS_MAX_XATTR_SIZE(root)) { | 478 | btrfs_dir_name_len(leaf, dir_item)) > BTRFS_MAX_XATTR_SIZE(root)) { |
479 | printk(KERN_CRIT "btrfs: invalid dir item name + data len: %u + %u\n", | 479 | btrfs_crit(root->fs_info, "invalid dir item name + data len: %u + %u", |
480 | (unsigned)btrfs_dir_name_len(leaf, dir_item), | 480 | (unsigned)btrfs_dir_name_len(leaf, dir_item), |
481 | (unsigned)btrfs_dir_data_len(leaf, dir_item)); | 481 | (unsigned)btrfs_dir_data_len(leaf, dir_item)); |
482 | return 1; | 482 | return 1; |