if (root->ref_cows)
btrfs_drop_extent_cache(inode, new_size & (~mask), (u64)-1, 0);
path = btrfs_alloc_path();
if (root->ref_cows)
btrfs_drop_extent_cache(inode, new_size & (~mask), (u64)-1, 0);
path = btrfs_alloc_path();
/* FIXME, add redo link to tree so we don't leak on crash */
key.objectid = inode->i_ino;
/* FIXME, add redo link to tree so we don't leak on crash */
key.objectid = inode->i_ino;
entry = rb_entry(parent, struct btrfs_inode, rb_node);
if (inode->i_ino < entry->vfs_inode.i_ino)
entry = rb_entry(parent, struct btrfs_inode, rb_node);
if (inode->i_ino < entry->vfs_inode.i_ino)
* and the replacement file is large. Start IO on it now so
* we don't add too much work to the end of the transaction
*/
* and the replacement file is large. Start IO on it now so
* we don't add too much work to the end of the transaction
*/