return 0;
}
-static int hole_mergeable(struct inode *inode, struct extent_buffer *leaf,
+static int hole_mergeable(struct btrfs_inode *inode, struct extent_buffer *leaf,
int slot, u64 start, u64 end)
{
struct btrfs_file_extent_item *fi;
return 0;
btrfs_item_key_to_cpu(leaf, &key, slot);
- if (key.objectid != btrfs_ino(BTRFS_I(inode)) ||
+ if (key.objectid != btrfs_ino(inode) ||
key.type != BTRFS_EXTENT_DATA_KEY)
return 0;
}
leaf = path->nodes[0];
- if (hole_mergeable(inode, leaf, path->slots[0]-1, offset, end)) {
+ if (hole_mergeable(BTRFS_I(inode), leaf, path->slots[0] - 1,
+ offset, end)) {
u64 num_bytes;
path->slots[0]--;
goto out;
}
- if (hole_mergeable(inode, leaf, path->slots[0], offset, end)) {
+ if (hole_mergeable(BTRFS_I(inode), leaf, path->slots[0], offset, end)) {
u64 num_bytes;
key.offset = offset;