Skip to content

Commit

Permalink
Btrfs: fix call to btrfs_search_slot in free space cache
Browse files Browse the repository at this point in the history
We are setting ins_len to 1 even tho we are just modifying an item that should
be there already.  This may cause the search stuff to split nodes on the way
down needelessly.  Set this to 0 since we aren't inserting anything.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
  • Loading branch information
Josef Bacik committed Oct 19, 2011
1 parent 482e6dc commit a9b5fcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
key.offset = offset;
key.type = 0;

ret = btrfs_search_slot(trans, root, &key, path, 1, 1);
ret = btrfs_search_slot(trans, root, &key, path, 0, 1);
if (ret < 0) {
ret = -1;
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, bytes - 1,
Expand Down

0 comments on commit a9b5fcd

Please sign in to comment.