diff options
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index cdc713062b03..f2a94999c371 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -2622,7 +2622,7 @@ int btrfs_insert_empty_items(struct btrfs_trans_handle *trans, | |||
2622 | total_data += data_size[i]; | 2622 | total_data += data_size[i]; |
2623 | } | 2623 | } |
2624 | 2624 | ||
2625 | total_size = total_data + (nr - 1) * sizeof(struct btrfs_item); | 2625 | total_size = total_data + (nr * sizeof(struct btrfs_item)); |
2626 | ret = btrfs_search_slot(trans, root, cpu_key, path, total_size, 1); | 2626 | ret = btrfs_search_slot(trans, root, cpu_key, path, total_size, 1); |
2627 | if (ret == 0) { | 2627 | if (ret == 0) { |
2628 | return -EEXIST; | 2628 | return -EEXIST; |