Commit a9b5fcdd authored by Josef Bacik's avatar Josef Bacik

Btrfs: fix call to btrfs_search_slot in free space cache

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: default avatarJosef Bacik <josef@redhat.com>
parent 482e6dc5
...@@ -802,7 +802,7 @@ int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode, ...@@ -802,7 +802,7 @@ int __btrfs_write_out_cache(struct btrfs_root *root, struct inode *inode,
key.offset = offset; key.offset = offset;
key.type = 0; 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) { if (ret < 0) {
ret = -1; ret = -1;
clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, bytes - 1, clear_extent_bit(&BTRFS_I(inode)->io_tree, 0, bytes - 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment